Class DocumentWebSocketService

java.lang.Object
org.exoplatform.documents.service.DocumentWebSocketService

public class DocumentWebSocketService extends Object
  • Field Details

  • 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

      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 UI
      recipientUsers - Collection of usernames of receivers
      params - 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 - WebSocketMessage to transmit via WebSocket
      recipientUsers - Collection of usernames of receivers
    • getCometdContextName

      public String getCometdContextName()
      Returns:
      'cometd' webapp context name
    • getUserToken

      public String getUserToken(String username)
      Generate a cometd Token for each user
      Parameters:
      username - user name for whom the token will be generated
      Returns:
      generated cometd token