Interface ClientControl.SessionEventStream.Event
- Enclosing interface:
- ClientControl.SessionEventStream
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
The session state.static enum
The event type. -
Method Summary
Modifier and TypeMethodDescriptionProvides a map of the previous values of session properties that have changed.Provides the reason a session was closed.boolean
Convenience method to determine whether the event notifies the opening of a new session.Provides the session's properties.Provides the session identifier of the client session that the event relates to.state()
Provides the current state of the session.type()
Provides the event type.
-
Method Details
-
sessionId
SessionId sessionId()Provides the session identifier of the client session that the event relates to.- Returns:
- the client session id
-
type
Provides the event type.- Returns:
- the event type
-
state
Provides the current state of the session.- Returns:
- the session state
-
isOpenEvent
boolean isOpenEvent()Convenience method to determine whether the event notifies the opening of a new session.This is equivalent to:
event.type() == Type.STATE && event.state() == State.ACTIVE
- Returns:
- true if the type is
STATE
and the state isACTIVE
, otherwise false
-
properties
Provides the session's properties.Only those properties requested when registering the listener will be present in the map.
If no properties were requested or
state()
isCLOSED
the map will be empty.- Returns:
- the map of session properties
-
changedProperties
Provides a map of the previous values of session properties that have changed.This map will be empty if no session properties were requested or the event did not result in a change of any properties.
This map will only be populated if
type()
isPROPERTIES
orstate()
isRECONNECTED
,FAILED_OVER
, orDISCONNECTED
.This will only contain keys that have changed and not the whole required property set.
When a new property is added the value in this map will be
null
.When a property is removed there will be a value in this map but not in
properties()
.- Returns:
- the map of changed session properties
-
closeReason
ClientControl.CloseReason closeReason()
-