This feature provides the ability for a client session to control other client sessions.
More...
|
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...
|
|
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.
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
-
handler | the 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
-
- Exceptions
-
ArgumentNullException | The given details enumeration or listener is null. |
SessionClosedException | The 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
-
listener | The listener to be called with session notifications. |
requiredProperties | A 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
-
ArgumentNullException | If listener is null. |
SessionClosedException | If the current session is closed. |