Class DocumentWebSocketService
java.lang.Object
org.exoplatform.documents.service.DocumentWebSocketService
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDocumentWebSocketService(org.exoplatform.ws.frameworks.cometd.ContinuationService continuationService, org.mortbay.cometd.continuation.EXoContinuationBayeux continuationBayeux) -
Method Summary
Modifier and TypeMethodDescriptionvoidbroadcastMessage(String wsEventName, Object... params) Propagate an event from Backend to frontend for all usersgetUserToken(String username) Generate a cometd Token for each uservoidsendBroadcastMessage(String wsEventName, org.exoplatform.documents.model.ActionData actionData) voidsendMessage(String wsEventName, Collection<String> recipientUsers, Object... params) Propagate an event from Backend to frontend to add dynamism in pagesvoidsendMessage(String wsEventName, org.exoplatform.documents.model.ActionData actionData, org.exoplatform.services.security.Identity identity) voidsendMessage(org.exoplatform.social.websocket.entity.WebSocketMessage messageObject, Collection<String> recipientUsers) Propagate an event from Backend to frontend to add dynamism in pages
-
Field Details
-
COMETD_CHANNEL
- See Also:
-
-
Constructor Details
-
DocumentWebSocketService
public DocumentWebSocketService(org.exoplatform.ws.frameworks.cometd.ContinuationService continuationService, org.mortbay.cometd.continuation.EXoContinuationBayeux continuationBayeux)
-
-
Method Details
-
sendMessage
public void sendMessage(String wsEventName, org.exoplatform.documents.model.ActionData actionData, org.exoplatform.services.security.Identity identity) -
sendMessage
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.social.websocket.entity.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
-
sendBroadcastMessage
public void sendBroadcastMessage(String wsEventName, org.exoplatform.documents.model.ActionData actionData) -
broadcastMessage
Propagate an event from Backend to frontend for all users- Parameters:
wsEventName- event name that will allow Browser to distinguish which behavior to adopt in order to update UIparams- an Array of parameters to include in message sent via WebSocket
-
getCometdContextName
- Returns:
- 'cometd' webapp context name
-
getUserToken
Generate a cometd Token for each user- Parameters:
username- user name for whom the token will be generated- Returns:
- generated cometd token
-