public static interface ClientControl.SessionDetailsListener extends ServerHandler
This is used along with
ClientControl.setSessionDetailsListener(Set, SessionDetailsListener)
to obtain notifications of Client details.
Each callback method has a sessionDetails
parameter. The provided
details will be filtered according to the requiredDetail
parameter specified when registering the listener.
Modifier and Type | Interface and Description |
---|---|
static class |
ClientControl.SessionDetailsListener.Default
This provides a default implementation of
ClientControl.SessionDetailsListener which will simply log client session
details at debug level. |
Modifier and Type | Method and Description |
---|---|
void |
onSessionClose(SessionId sessionId,
SessionDetails sessionDetails,
ClientControl.CloseReason closeReason)
Notification that a client session has closed.
|
void |
onSessionOpen(SessionId sessionId,
SessionDetails sessionDetails)
Notification that a new client session has been opened.
|
void |
onSessionUpdate(SessionId sessionId,
SessionDetails sessionDetails)
Notification of a change to a client session.
|
onActive, onClose
void onSessionOpen(SessionId sessionId, SessionDetails sessionDetails)
When the listener is registered, this will be called for all existing sessions. It will then be called for every new session that opens whilst the listener is registered.
This will be called for every client session regardless of the level of detail requested.
sessionId
- the session identifiersessionDetails
- the details of the client sessionvoid onSessionUpdate(SessionId sessionId, SessionDetails sessionDetails)
Only called if the change is of interest to the listener, i.e. if
detail covered by the requiredDetail
parameter changes.
All available details will be supplied, filtered by
requiredDetail
, not just the changed detail.
sessionId
- the client session idsessionDetails
- the current detailsvoid onSessionClose(SessionId sessionId, SessionDetails sessionDetails, ClientControl.CloseReason closeReason)
This will be called for every client that closes whilst the listener is registered regardless of the level of detail requested.
sessionId
- the session identifier of the client that has closedsessionDetails
- the details of the client sessioncloseReason
- why the session was closedCopyright © 2016 Push Technology Ltd. All Rights Reserved.