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
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:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionGraphQLSessionDisconnectEvent(Object source, org.springframework.messaging.Message<GraphQLMessage> message, String sessionId, org.springframework.web.socket.CloseStatus closeStatus) Create a new SessionDisconnectEvent.GraphQLSessionDisconnectEvent(Object source, org.springframework.messaging.Message<GraphQLMessage> message, String sessionId, org.springframework.web.socket.CloseStatus closeStatus, Principal user) Create a new SessionDisconnectEvent. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.web.socket.CloseStatusReturn the status with which the session was closed.Return the session id.toString()Methods inherited from class org.activiti.cloud.services.notifications.graphql.ws.transport.AbstractGraphQLSubProtocolEvent
getMessage, getUserMethods inherited from class org.springframework.context.ApplicationEvent
getTimestampMethods inherited from class java.util.EventObject
getSource
-
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 (nevernull)message- the messagesessionId- the disconnect messagecloseStatus- 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 (nevernull)message- the messagesessionId- the disconnect messagecloseStatus- the status objectuser- the current session user
-
-
Method Details
-
getSessionId
Return the session id. -
getCloseStatus
public org.springframework.web.socket.CloseStatus getCloseStatus()Return the status with which the session was closed. -
toString
- Overrides:
toStringin classAbstractGraphQLSubProtocolEvent
-