Diffusion .NET Client Library  6.1.5
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
PushTechnology.ClientInterface.Client.Features.Control.Clients.SessionPropertiesListenerDefault Class Reference

This provides a default implementation of ISessionPropertiesListener which will simply log session properties callbacks at debug level. This should only be used for diagnostic purposes. More...

Inheritance diagram for PushTechnology.ClientInterface.Client.Features.Control.Clients.SessionPropertiesListenerDefault:
PushTechnology.ClientInterface.Client.Features.Control.Clients.ISessionPropertiesListener PushTechnology.ClientInterface.Client.Callbacks.IServerHandler

Public Member Functions

virtual void OnRegistered (IRegistration registration)
 Called when the handler has been successfully registered with the server. More...
 
virtual void OnClose ()
 Called if the handler is closed. This happens if the call to register the handler fails, or the handler is unregistered. More...
 
virtual void OnError (ErrorReason errorReason)
 Notification of a contextual error related to this handler. This is analogous to an unchecked exception being raised. Situations in which onError is called include the session being closed before the handler is registered, a communication timeout, or a problem with the provided parameters. No further calls will be made to this handler. More...
 
virtual void OnSessionOpen (ISessionId sessionId, IDictionary< string, string > properties)
 Notification that a new client session has been opened. More...
 
virtual void OnSessionEvent (ISessionId sessionId, SessionPropertiesListenerEventType?eventType, IDictionary< string, string > properties, IDictionary< string, string > previousValues)
 Notification of a session event that can result in a change of properties. More...
 
virtual void OnSessionClose (ISessionId sessionId, IDictionary< string, string > properties, CloseReason closeReason)
 Notification that a client session has closed. More...
 

Detailed Description

This provides a default implementation of ISessionPropertiesListener which will simply log session properties callbacks at debug level. This should only be used for diagnostic purposes.

Member Function Documentation

virtual void PushTechnology.ClientInterface.Client.Features.Control.Clients.SessionPropertiesListenerDefault.OnClose ( )
virtual

Called if the handler is closed. This happens if the call to register the handler fails, or the handler is unregistered.

Implements PushTechnology.ClientInterface.Client.Callbacks.IServerHandler.

virtual void PushTechnology.ClientInterface.Client.Features.Control.Clients.SessionPropertiesListenerDefault.OnError ( ErrorReason  errorReason)
virtual

Notification of a contextual error related to this handler. This is analogous to an unchecked exception being raised. Situations in which onError is called include the session being closed before the handler is registered, a communication timeout, or a problem with the provided parameters. No further calls will be made to this handler.

Parameters
errorReasona value representing the error; this can be one of constants defined in ErrorReason, or a feature-specific reason

Implements PushTechnology.ClientInterface.Client.Callbacks.IServerHandler.

virtual void PushTechnology.ClientInterface.Client.Features.Control.Clients.SessionPropertiesListenerDefault.OnRegistered ( IRegistration  registration)
virtual

Called when the handler has been successfully registered with the server.

A session can register at most one a single handler of each type. If there is already a handler registered the operation will fail, registeredHandler will be closed, and the session error handler will be notified. To change the handler, first close the previous handler.

Parameters
registrationreference that allows the handler to be closed

Implements PushTechnology.ClientInterface.Client.Callbacks.IServerHandler.

virtual void PushTechnology.ClientInterface.Client.Features.Control.Clients.SessionPropertiesListenerDefault.OnSessionClose ( ISessionId  sessionId,
IDictionary< string, string >  properties,
CloseReason  closeReason 
)
virtual

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.

Parameters
sessionIdThe session identifier of the client that has closed.
propertiesThe 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.
closeReasonWhy the session was closed.

Implements PushTechnology.ClientInterface.Client.Features.Control.Clients.ISessionPropertiesListener.

virtual void PushTechnology.ClientInterface.Client.Features.Control.Clients.SessionPropertiesListenerDefault.OnSessionEvent ( ISessionId  sessionId,
SessionPropertiesListenerEventType eventType,
IDictionary< string, string >  properties,
IDictionary< string, string >  previousValues 
)
virtual

Notification of a session event that can result in a change of properties.

Parameters
sessionIdThe client session id.
eventTypeIndicates the type of event.
propertiesThe map of current requested property values. This may be empty if no properties were requested.
previousValuesA 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 .

Implements PushTechnology.ClientInterface.Client.Features.Control.Clients.ISessionPropertiesListener.

virtual void PushTechnology.ClientInterface.Client.Features.Control.Clients.SessionPropertiesListenerDefault.OnSessionOpen ( ISessionId  sessionId,
IDictionary< string, string >  properties 
)
virtual

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.

Parameters
sessionIdThe session identifier.
propertiesThe 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 prsent in the map.

Implements PushTechnology.ClientInterface.Client.Features.Control.Clients.ISessionPropertiesListener.


The documentation for this class was generated from the following file: