Class ClientControl.SessionPropertiesStream.Default
java.lang.Object
com.pushtechnology.diffusion.client.callbacks.Callback.Default
com.pushtechnology.diffusion.client.callbacks.Stream.Default
com.pushtechnology.diffusion.client.features.control.clients.ClientControl.SessionPropertiesStream.Default
- All Implemented Interfaces:
Callback
,Stream
,ClientControl.SessionPropertiesStream
- Enclosing interface:
- ClientControl.SessionPropertiesStream
public static class ClientControl.SessionPropertiesStream.Default
extends Stream.Default
implements ClientControl.SessionPropertiesStream
This provides a default implementation of
ClientControl.SessionPropertiesStream
which will simply log session
properties callbacks at debug level. This should only be used for
diagnostic purposes.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.pushtechnology.diffusion.client.callbacks.Callback
Callback.Default
Nested classes/interfaces inherited from interface com.pushtechnology.diffusion.client.features.control.clients.ClientControl.SessionPropertiesStream
ClientControl.SessionPropertiesStream.Default, ClientControl.SessionPropertiesStream.EventType
Nested classes/interfaces inherited from interface com.pushtechnology.diffusion.client.callbacks.Stream
Stream.Default
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
onSessionClose
(SessionId sessionId, Map<String, String> properties, ClientControl.CloseReason closeReason) Notification that a client session has closed.void
onSessionEvent
(SessionId sessionId, ClientControl.SessionPropertiesStream.EventType eventType, Map<String, String> properties, Map<String, String> previousValues) Notification of a session event that can result in a change of properties.void
onSessionOpen
(SessionId sessionId, Map<String, String> properties) Notification that a new client session has been opened.Methods inherited from class com.pushtechnology.diffusion.client.callbacks.Stream.Default
onClose
Methods inherited from class com.pushtechnology.diffusion.client.callbacks.Callback.Default
onError
-
Constructor Details
-
Default
public Default()
-
-
Method Details
-
onSessionOpen
Description copied from interface:ClientControl.SessionPropertiesStream
Notification that a new client session has been opened.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 requested session properties.
- Specified by:
onSessionOpen
in interfaceClientControl.SessionPropertiesStream
- Parameters:
sessionId
- the session identifierproperties
- the map of requested session property values. This can be empty if no properties were requested. If a requested property did not exist, it will not be present in the map.
-
onSessionEvent
public void onSessionEvent(SessionId sessionId, ClientControl.SessionPropertiesStream.EventType eventType, Map<String, String> properties, Map<String, String> previousValues) Description copied from interface:ClientControl.SessionPropertiesStream
Notification of a session event that can result in a change of properties.- Specified by:
onSessionEvent
in interfaceClientControl.SessionPropertiesStream
- Parameters:
sessionId
- the client session ideventType
- indicates the type of eventproperties
- the map of current requested property values. This can be empty if no properties were requested. If a requested property did not exist, it will not be present in the map.previousValues
- a map of the previous values of keys that have changed. This will only contain keys that have changed and not the whole required property set. This can be empty if an event is being reported that did not result in the change of any of the required properties. When a new property is added, the value in this map will be null. When a property is removed, it will have a value in this map but not inproperties
.
-
onSessionClose
public void onSessionClose(SessionId sessionId, Map<String, String> properties, ClientControl.CloseReason closeReason) Description copied from interface:ClientControl.SessionPropertiesStream
Notification that a client session has closed.This will be called for every client that closes whilst the listener is registered regardless of requested session properties.
- Specified by:
onSessionClose
in interfaceClientControl.SessionPropertiesStream
- Parameters:
sessionId
- the session identifier of the client that has closedproperties
- the map of requested property values at the point when the session was closed. This can be empty if no properties were requested. If a requested property did not exist, it will not be present in the map.closeReason
- why the session was closed
-