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:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description GraphQLSessionDisconnectEvent(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.web.socket.CloseStatusgetCloseStatus()Return the status with which the session was closed.StringgetSessionId()Return the session id.StringtoString()-
Methods inherited from class org.activiti.cloud.services.notifications.graphql.ws.transport.AbstractGraphQLSubProtocolEvent
getMessage, getUser
-
Methods inherited from class java.util.EventObject
getSource
-
-
-
-
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 (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 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.
-
toString
public String toString()
- Overrides:
toStringin classAbstractGraphQLSubProtocolEvent
-
-