Package org.exoplatform.agenda.service
Class AgendaWebSocketService
- java.lang.Object
-
- org.exoplatform.agenda.service.AgendaWebSocketService
-
public class AgendaWebSocketService extends Object
A service to push notifications from server to browsers of users about modifications made by other users on events.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOMETD_CHANNEL
-
Constructor Summary
Constructors Constructor Description AgendaWebSocketService(org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.agenda.service.AgendaCalendarService agendaCalendarService, org.exoplatform.ws.frameworks.cometd.ContinuationService continuationService, org.mortbay.cometd.continuation.EXoContinuationBayeux continuationBayeux)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCometdContextName()StringgetUserToken(String username)Generate a cometd Token for each uservoidsendMessage(String wsEventName, Collection<String> recipientUsers, Object... params)Propagate an event from Backend to frontend to add dynamism in pagesvoidsendMessage(String wsEventName, org.exoplatform.agenda.model.AgendaEventModification eventModification)Propagate an event from Backend to frontend to add dynamism in pagesvoidsendMessage(org.exoplatform.agenda.model.WebSocketMessage messageObject, Collection<String> recipientUsers)Propagate an event from Backend to frontend to add dynamism in pages
-
-
-
Field Detail
-
COMETD_CHANNEL
public static final String COMETD_CHANNEL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AgendaWebSocketService
public AgendaWebSocketService(org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.agenda.service.AgendaCalendarService agendaCalendarService, org.exoplatform.ws.frameworks.cometd.ContinuationService continuationService, org.mortbay.cometd.continuation.EXoContinuationBayeux continuationBayeux)
-
-
Method Detail
-
sendMessage
public void sendMessage(String wsEventName, org.exoplatform.agenda.model.AgendaEventModification eventModification)
Propagate an event from Backend to frontend to add dynamism in pages- Parameters:
wsEventName- event name that will allow Browser to distinguish which behavior to adopt in order to update UIeventModification- The event modification object that provides the list of modifications made on event
-
sendMessage
public void sendMessage(String wsEventName, Collection<String> recipientUsers, Object... params)
Propagate an event from Backend to frontend to add dynamism in pages- Parameters:
wsEventName- event name that will allow Browser to distinguish which behavior to adopt in order to update UIrecipientUsers-Collectionof usernames of receiversparams- an Array of parameters to include in message sent via WebSocket
-
sendMessage
public void sendMessage(org.exoplatform.agenda.model.WebSocketMessage messageObject, Collection<String> recipientUsers)Propagate an event from Backend to frontend to add dynamism in pages- Parameters:
messageObject-WebSocketMessageto transmit via WebSocketrecipientUsers-Collectionof usernames of receivers
-
getCometdContextName
public String getCometdContextName()
- Returns:
- 'cometd' webapp context name
-
-