Diffusion .NET API  5.9.24
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Events Pages
PushTechnology.ClientInterface.Client.Features.Control.Clients.IClientControl Interface Reference

This feature provides the ability for a client session to control other client sessions. More...

Inheritance diagram for PushTechnology.ClientInterface.Client.Features.Control.Clients.IClientControl:
PushTechnology.ClientInterface.Client.Features.IFeature

Public Member Functions

void SetSessionPropertiesListener (ISessionPropertiesListener listener, params string[] requiredProperties)
 Register a listener that will be notified when client sessions are opened, disconnected, reconnected, closed or when selected session property values are updated. More...
 
void GetSessionProperties (SessionId sessionId, List< string > requiredProperties, ISessionPropertiesCallback callback)
 Query the server for property values of a specified client session. More...
 
void GetSessionProperties< TC > (SessionId sessionId, List< string > requiredProperties, TC context, ISessionPropertiesContextCallback< TC > callback)
 Query the server for property values of a specified client session. More...
 
void SetSessionDetailsListener (IEnumerable< DetailType > requiredDetail, ISessionDetailsListener listener)
 Register a listener that will be notified when client sessions are opened or closed. More...
 
void GetSessionDetails< TContext > (SessionId sessionId, IEnumerable< DetailType > types, TContext context, ISessionDetailsContextCallback< TContext > callback)
 Query the server for details of a specified client session. More...
 
void GetSessionDetails (SessionId sessionId, IEnumerable< DetailType > types, ISessionDetailsCallback callback)
 Query the server for details of a specified client session. More...
 
void SetQueueEventHandler (IQueueEventHandler handler)
 Register a handler for client queue threshold events. Each controller session may register a handler. For each event, the server will select a single handler. More...
 
void Close (SessionId clientSessionId, IClientCallback callback)
 Close a client session. More...
 
void Close< TC > (SessionId clientSessionId, TC context, IClientContextCallback< TC > callback)
 Close a client session with a contextual callback. More...
 
void Close (SessionId clientSessionId, string reason, IClientCallback callback)
 Close a client session. More...
 
void Close< TC > (SessionId clientSessionId, string reason, TC context, IClientContextCallback< TC > callback)
 Close a client session with a contextual callback. More...
 
void SetConflated (SessionId clientSessionId, bool conflate, IClientCallback callback)
 Control client queue conflation. More...
 
void SetConflated< TC > (SessionId clientSessionId, bool conflate, TC context, IClientContextCallback< TC > callback)
 Control client queue conflation with a contextual callback. More...
 
void SetThrottled (SessionId clientSessionId, ThrottlerType throttlerType, int throttlingLimit, IClientCallback callback)
 Instruct a client to conflate its message queue, and to throttle the queue according to the provided parameters. More...
 
void SetThrottled< TC > (SessionId clientSessionId, ThrottlerType throttlerType, int throttlingLimit, TC context, IClientContextCallback< TC > callback)
 Instruct a client to conflate its message queue, and to throttle the queue according to the provided parameters. More...
 
SessionId SessionIdFromString (string sessionIdAsString)
 Restore a SessionId from a string. More...
 

Additional Inherited Members

- Properties inherited from PushTechnology.ClientInterface.Client.Features.IFeature
ISession Session [get]
 Get the session that the service is associated with. More...
 

Detailed Description

This feature provides the ability for a client session to control other client sessions.

It allows for notifications of client sessions starting and closing as well as the ability to manage clients (forcibly closing them etc.).

Access Control

A session must have GlobalPermission.VIEW_SESSION permission to be able to listen for notifications using SetSessionDetailsListener or SetSessionPropertiesListener, GetSessionDetails or GetSessionProperties of other sessions or listen for SetQueueEventHandler queue events. In addition GlobalPermission.REGISTER_HANDLER permission is required to set a session properties listener, a session details listener or queue event handler.

Member Function Documentation

void PushTechnology.ClientInterface.Client.Features.Control.Clients.IClientControl.Close ( SessionId  clientSessionId,
IClientCallback  callback 
)

Close a client session.

Parameters
clientSessionIdThe client session to close.
callbackthe operation callback.
void PushTechnology.ClientInterface.Client.Features.Control.Clients.IClientControl.Close ( SessionId  clientSessionId,
string  reason,
IClientCallback  callback 
)

Close a client session.

Parameters
clientSessionIdThe client session to close.
reasonUnused.
callbackthe operation callback.
void PushTechnology.ClientInterface.Client.Features.Control.Clients.IClientControl.Close< TC > ( SessionId  clientSessionId,
TC  context,
IClientContextCallback< TC >  callback 
)

Close a client session with a contextual callback.

Parameters
clientSessionIdThe client session to close.
contextthe context object to pass to the callback.
callbackthe operation callback.
void PushTechnology.ClientInterface.Client.Features.Control.Clients.IClientControl.Close< TC > ( SessionId  clientSessionId,
string  reason,
TC  context,
IClientContextCallback< TC >  callback 
)

Close a client session with a contextual callback.

Parameters
clientSessionIdThe client session to close.
reasonUnused.
contextthe context object to pass to the callback.
callbackthe operation callback.
void PushTechnology.ClientInterface.Client.Features.Control.Clients.IClientControl.GetSessionDetails ( SessionId  sessionId,
IEnumerable< DetailType types,
ISessionDetailsCallback  callback 
)

Query the server for details of a specified client session.

Parameters
sessionIdThe client session identifier.
typesThe enumerable of the types of detail to return.
callbackCalled with the response.
Exceptions
ArgumentNullExceptionThe given sessionId, details enumeration or callback is null.
SessionClosedExceptionThe local session is closed.
void PushTechnology.ClientInterface.Client.Features.Control.Clients.IClientControl.GetSessionDetails< TContext > ( SessionId  sessionId,
IEnumerable< DetailType types,
TContext  context,
ISessionDetailsContextCallback< TContext >  callback 
)

Query the server for details of a specified client session.

Template Parameters
TContextThe context type.
Parameters
sessionIdThe client session identifier.
typesThe enumerable of the types of detail to return.
contextPassed to the handler to allow requests and responses to be correlated. The caller may use any convenient object reference, including null.
callbackCalled with the response.
Exceptions
ArgumentNullExceptionThe given sessionId, details enumeration or callback is null.
SessionClosedExceptionThe local session is closed.
void PushTechnology.ClientInterface.Client.Features.Control.Clients.IClientControl.GetSessionProperties ( SessionId  sessionId,
List< string >  requiredProperties,
ISessionPropertiesCallback  callback 
)

Query the server for property values of a specified client session.

Parameters
sessionIdIdentifies the client session.
requiredPropertiesSpecifies the keys of the property values required. See ISession for a list of the available fixed property keys. To request all fixed properties, SessionControlConstants.AllFixedProperties should be included as a key and any other fixed property keys would be ignored. To request all user properties, SessionControlConstants.AllUserProperties should be included as a key and any other user property keys would be ignored.
callbackCalled with the response.
void PushTechnology.ClientInterface.Client.Features.Control.Clients.IClientControl.GetSessionProperties< TC > ( SessionId  sessionId,
List< string >  requiredProperties,
TC  context,
ISessionPropertiesContextCallback< TC >  callback 
)

Query the server for property values of a specified client session.

Template Parameters
TCThe context object type.
Parameters
sessionIdIdentifies the client session.
requiredPropertiesSpecifies the keys of the property values required. See ISession for a list of the available fixed property keys. To request all fixed properties, SessionControlConstants.AllFixedProperties may be included as a key in which case any other fixed property keys would be ignored. To request all user properties, SessionControlConstants.AllUserProperties can be included as a key in which case any other user property keys would be ignored.
contextPassed to the callback to allow requests and responses to be correlated. The caller can use any convenient object reference, including null.
callbackCalled with the response.
SessionId PushTechnology.ClientInterface.Client.Features.Control.Clients.IClientControl.SessionIdFromString ( string  sessionIdAsString)

Restore a SessionId from a string.

This method allows a SessionId to be converted to a string with SessionIdImpl.ToString and later recovered from the string. This is a client operation. A session that has been closed will not be recreated.

Parameters
sessionIdAsStringA string previously created with SessionIdImpl.ToString

.

Returns
The SessionId

.

void PushTechnology.ClientInterface.Client.Features.Control.Clients.IClientControl.SetConflated ( SessionId  clientSessionId,
bool  conflate,
IClientCallback  callback 
)

Control client queue conflation.

Calling this method will also disable throttling. Use SetThrottled to enable both conflation and throttling.

Parameters
clientSessionIdThe client session.
conflatetrue to enable, false to disable.
callbackthe operation callback
void PushTechnology.ClientInterface.Client.Features.Control.Clients.IClientControl.SetConflated< TC > ( SessionId  clientSessionId,
bool  conflate,
TC  context,
IClientContextCallback< TC >  callback 
)

Control client queue conflation with a contextual callback.

Calling this method will also disable throttling. Use SetThrottled to enable both conflation and throttling.

Parameters
clientSessionIdThe client session.
conflatetrue to enable, false to disable.
contextthe context to pass to the callback.
callbackthe operation callback
void PushTechnology.ClientInterface.Client.Features.Control.Clients.IClientControl.SetQueueEventHandler ( IQueueEventHandler  handler)

Register a handler for client queue threshold events. Each controller session may register a handler. For each event, the server will select a single handler.

Each control session can register a single handler. See IServerHandler.OnActive closed (using IRegisteredHandler.Close()) if no longer required. To set a different handler the current handler must first be closed. For each event, the server will select a single handler.

The client may choose to act upon client queue events by conflating or throttling the client.

Parameters
handlerthe queue handler to set
void PushTechnology.ClientInterface.Client.Features.Control.Clients.IClientControl.SetSessionDetailsListener ( IEnumerable< DetailType requiredDetail,
ISessionDetailsListener  listener 
)

Register a listener that will be notified when client sessions are opened or closed.

When a listener is first set, it will be called with the details of all currently open client sessions. The amount of data transferred from the server is proportional to the number of connected clients and is potentially large. The amount of data can be reduced using the requiredDetail parameter.

Each control session can register a single listener (See IServerHandler.OnActive(IRegisteredHandler)). A listener may be closed (using IRegisteredHandler.Close()) if no longer required. To set a different listener the current listener must first be closed.

The requiredDetail is usually an IEnumerable{DetailType}. For example, an array containing all DetailTypes can be used to request all session details. The enumerable controls the level of detail provided and whether the listener is called for updates to sessions. The listener is always called when sessions are opened or closed. The enumerable may be empty, in which case the listener is only called when sessions are opened or closed.

Parameters
requiredDetailSpecifies the level of detail provided to the listener, and determines whether ISessionDetailsListener.OnSessionUpdate(SessionId, ISessionDetails) will be called.
listenerThe listener to register.
Exceptions
ArgumentNullExceptionThe given details enumeration or listener is null.
SessionClosedExceptionThe local session is closed.
void PushTechnology.ClientInterface.Client.Features.Control.Clients.IClientControl.SetSessionPropertiesListener ( ISessionPropertiesListener  listener,
params string[]  requiredProperties 
)

Register a listener that will be notified when client sessions are opened, disconnected, reconnected, closed or when selected session property values are updated.

When a listener is first set, it will be called with the required properties of all currently open client sessions. The amount of data transferred from the server is proportional to the number of connected clients and is potentially large. The amount of data can be reduced using the requiredProperties parameter.

Each control session can register a single listener (See Callbacks.IServerHandler.OnRegistered). A listener may be closed (using IRegistration.Close) if no longer required. To set a different listener the current listener must first be closed.

The requiredProperties parameter is used to select the property values required.

The requested property set controls the level of detail provided and whether the listener is called for updates to sessions. If no properties are requested then the listener is not called when session properties are updated.

Parameters
listenerThe listener to be called with session notifications.
requiredPropertiesA list of required property keys. See ISession for a full list of available fixed property keys.

To request no properties, null or an empty set may be supplied. To requested all fixed properties, SessionControlConstants.AllFixedProperties should be included as a key and any other fixed property keys would be ignored. To request all user properties, SessionControlConstants.AllUserProperties should be included as a key and any other user property keys supplied would be ignored.

Exceptions
ArgumentNullExceptionIf listener is null.
SessionClosedExceptionIf the current session is closed.
void PushTechnology.ClientInterface.Client.Features.Control.Clients.IClientControl.SetThrottled ( SessionId  clientSessionId,
ThrottlerType  throttlerType,
int  throttlingLimit,
IClientCallback  callback 
)

Instruct a client to conflate its message queue, and to throttle the queue according to the provided parameters.

Parameters
clientSessionIdThe client session.
throttlerTypeThe type of throttling.
throttlingLimitThe throttling limit. The meaning of this limit depends on the throttler type.
callbackthe operation callback
void PushTechnology.ClientInterface.Client.Features.Control.Clients.IClientControl.SetThrottled< TC > ( SessionId  clientSessionId,
ThrottlerType  throttlerType,
int  throttlingLimit,
TC  context,
IClientContextCallback< TC >  callback 
)

Instruct a client to conflate its message queue, and to throttle the queue according to the provided parameters.

Parameters
clientSessionIdThe client session.
throttlerTypeThe type of throttling.
throttlingLimitThe throttling limit. The meaning of this limit depends on the throttler type.
contextthe context to pass to the callback.
callbackthe operation callback

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