Interface ISessionPropertiesListener
- Assembly
- Diffusion.Client.dll
The handler for session properties listener notifications.
This is used along with SetSessionPropertiesListener(ISessionPropertiesListener, params string[]) to obtain notifications for client sessions.
Callbacks with a properties parameter will provide a map of the property values requested when registering the listener.
[Obsolete("Deprecated since 6.12. Use IClientControl.AddSessionEventListenerAsync instead.")]
public interface ISessionPropertiesListener : IServerHandler
- Inherited Members
Remarks
Caution
Deprecated since 6.12. Use the new AddSessionEventListenerAsync(ISessionEventStream, ISessionEventParameters), which provides greater functionality and reports sessions at all cluster members. This interface will be removed in a future release.
Methods
OnSessionClose(ISessionId, IDictionary<string, string>, CloseReason)
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.
void OnSessionClose(ISessionId sessionId, IDictionary<string, string> properties, CloseReason closeReason)
Parameters
sessionIdISessionIdThe session identifier of the client that has closed.
propertiesIDictionary<string, string>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 then it will not be present in the map.
closeReasonCloseReasonWhy the session was closed.
OnSessionEvent(ISessionId, SessionPropertiesListenerEventType?, IDictionary<string, string>, IDictionary<string, string>)
Notification of a session event that can result in a change of properties.
void OnSessionEvent(ISessionId sessionId, SessionPropertiesListenerEventType? eventType, IDictionary<string, string> properties, IDictionary<string, string> previousValues)
Parameters
sessionIdISessionIdThe client session id.
eventTypeSessionPropertiesListenerEventType?Indicates the type of event.
propertiesIDictionary<string, string>The map of current requested property values. This may be empty if no properties were requested.
previousValuesIDictionary<string, string>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 then the value in this map will be null. When a property is removed then it will have a value in this map but not in
properties.
OnSessionOpen(ISessionId, IDictionary<string, string>)
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.
void OnSessionOpen(ISessionId sessionId, IDictionary<string, string> properties)
Parameters
sessionIdISessionIdThe session identifier.
propertiesIDictionary<string, string>The map of requested session property values. This can be empty if no properties were requested. If a requested property did not exist then it will not be present in the map.