Class GraphQLSessionDisconnectEvent

  • All Implemented Interfaces:
    Serializable

    public class GraphQLSessionDisconnectEvent
    extends AbstractGraphQLSubProtocolEvent
    Event raised when the session of a WebSocket client is closed.

    Note that this event may be raised more than once for a single session and therefore event consumers should be idempotent and ignore a duplicate event.

    See Also:
    Serialized Form
    • Constructor Detail

      • GraphQLSessionDisconnectEvent

        public GraphQLSessionDisconnectEvent​(Object source,
                                             org.springframework.messaging.Message<GraphQLMessage> message,
                                             String sessionId,
                                             org.springframework.web.socket.CloseStatus closeStatus)
        Create a new SessionDisconnectEvent.
        Parameters:
        source - the component that published the event (never null)
        message - the message
        sessionId - the disconnect message
        closeStatus - the status object
      • GraphQLSessionDisconnectEvent

        public GraphQLSessionDisconnectEvent​(Object source,
                                             org.springframework.messaging.Message<GraphQLMessage> message,
                                             String sessionId,
                                             org.springframework.web.socket.CloseStatus closeStatus,
                                             Principal user)
        Create a new SessionDisconnectEvent.
        Parameters:
        source - the component that published the event (never null)
        message - the message
        sessionId - the disconnect message
        closeStatus - the status object
        user - the current session user
    • Method Detail

      • getSessionId

        public String getSessionId()
        Return the session id.
      • getCloseStatus

        public org.springframework.web.socket.CloseStatus getCloseStatus()
        Return the status with which the session was closed.