Class GraphQLSessionDisconnectEvent

java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.activiti.cloud.services.notifications.graphql.ws.transport.AbstractGraphQLSubProtocolEvent
org.activiti.cloud.services.notifications.graphql.ws.transport.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:
  • Constructor Details

    • 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 Details

    • 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.
    • toString

      public String toString()
      Overrides:
      toString in class AbstractGraphQLSubProtocolEvent