Interface WebSocketService

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String generateActionId()
      This method does generation for unique action id
      java.util.List<java.lang.String> getSubscribers​(java.lang.String destination)
      This method retrieves all subscribers based on destination
      void sendGlobalResponse​(java.lang.String destination, org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor, java.util.Map<java.lang.String,​java.lang.Object> result)
      This method does server-push for all users
      void sendSharedResponse​(java.lang.String destination, java.util.Map<java.lang.String,​java.lang.Object> result)
      This method does server-push for subscribers from destination
      void sendUserResponse​(java.lang.String destination, java.lang.String sessionId, org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor, java.util.Map<java.lang.String,​java.lang.Object> result)
      This method does server-push for current user
    • Method Detail

      • generateActionId

        java.lang.String generateActionId()
        This method does generation for unique action id
        Returns:
        generated unique id for the response
      • sendSharedResponse

        void sendSharedResponse​(java.lang.String destination,
                                java.util.Map<java.lang.String,​java.lang.Object> result)
        This method does server-push for subscribers from destination
        Parameters:
        destination - endpoint for web-socket connection
        result - payload object for response
      • sendGlobalResponse

        void sendGlobalResponse​(java.lang.String destination,
                                org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor,
                                java.util.Map<java.lang.String,​java.lang.Object> result)
        This method does server-push for all users
        Parameters:
        destination - endpoint for web-socket connection
        headerAccessor - header for web-socket response
        result - payload object for response
      • sendUserResponse

        void sendUserResponse​(java.lang.String destination,
                              java.lang.String sessionId,
                              org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor,
                              java.util.Map<java.lang.String,​java.lang.Object> result)
        This method does server-push for current user
        Parameters:
        destination - endpoint for web-socket connection
        sessionId - session id for current connected user
        headerAccessor - header for web-socket response
        result - payload object for response
      • getSubscribers

        java.util.List<java.lang.String> getSubscribers​(java.lang.String destination)
        This method retrieves all subscribers based on destination
        Parameters:
        destination - endpoint for web-socket connection
        Returns:
        the list of all subscribers based on destination