Diffusion .NET Client Library  6.1.5
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
PushTechnology.ClientInterface.Client.Session.ISession Interface Reference

A client session with a server or servers. More...

Public Member Functions

void Close ()
 Close the session. More...
 

Properties

ISessionId SessionId [get]
 Returns the unique identifier for the session as assigned by the (first) server it connects to. More...
 
string Principal [get]
 Returns the name of the security principal associated with the session. More...
 
ISessionAttributes Attributes [get]
 Returns the session attributes. More...
 
SessionState State [get]
 Returns the current state of the session. More...
 
ITopics Topics [get]
 Gets the 'Topics' feature. More...
 
IPings Ping [get]
 Gets the 'Ping' feature. More...
 
ITopicControl TopicControl [get]
 Gets the 'Topic Control' feature. More...
 
ISubscriptionControl SubscriptionControl [get]
 Gets the 'Subscription Control' feature. More...
 
IAuthenticationControl AuthenticationControl [get]
 Gets the 'Authentication Control' feature. More...
 
ISystemAuthenticationControl SystemAuthenticationControl [get]
 Gets the 'System Authentication Control' feature. More...
 
ISecurity Security [get]
 Gets the 'Security' feature. More...
 
ITopicUpdateControl TopicUpdateControl [get]
 Gets the 'Topic Update Control' feature. More...
 
IMessaging Messaging [get]
 Gets the 'Messaging' feature. More...
 
IMessagingControl MessagingControl [get]
 Gets the 'Messaging Control' feature. More...
 
IClientControl ClientControl [get]
 Gets the 'Client Control' feature. More...
 
ISecurityControl SecurityControl [get]
 Gets the 'Security Control' feature. More...
 
ITimeSeries TimeSeries [get]
 Gets the 'Time Series' feature. More...
 
ITopicNotifications TopicNotifications [get]
 Gets the 'Topic Notifications' feature. More...
 

Events

EventHandler
< SessionListenerEventArgs
StateChanged
 Notifies when the session state changes. More...
 
EventHandler
< SessionErrorHandlerEventArgs
ErrorNotified
 Notifies when an error occurs. More...
 

Detailed Description

A client session with a server or servers.

To open a new session connection to a server, use ISessionFactory.Open(string) specifying the server url. There is also a non-blocking version ISessionFactory.Open(string,ISessionOpenCallback) which calls back when the session has been connected.

The factory allows a number of other attributes of the session to be specified.

The functionality of a session is exposed to the application by getting the required feature(s) using the various retrieval methods.

For each session there is a single instance of each feature which may be obtained and used at any time.

Session properties

Every session has a number of fixed properties associated with it and may also have additional user-defined properties assigned to it by AuthenticationHandler authentication handlers}.

Properties are essentially key/value pairs. A property is identified by its key. All property keys must be alphanumeric, starting with an alphabetic and are case sensitive. Embedded whitespace is not allowed.

All fixed properties are identified by a '$' prefix. The currently available fixed session properties are:

Fixed Property Key Property Description
$SessionId The session identifier. Equivalent to ISessionId.ToString().
$Principal The session principal. Equivalent to ClientSummary.Principal .
$ClientType The client type of the session. Equivalent to ClientSummary.ClientType.
$Transport The session transport type. Equivalent to ClientSummary.TransportType.
$Connector The name of the connector on which the client connected. See ISessionDetails.ConnectorName.
$Country The session's country code. See ICountryDetails.Country.
$Language The session's language code. See ICountryDetails.Language.
$ServerName The name of the session's server. See ISessionDetails.ServerName.
$ClientIP The session's address. See IClientLocation.Address.
$Latitude The session's latitude, if available. See ClientLocation.Coordinates.
$Longitude The session's longitude, if available. See ClientLocation.Coordinates.
$StartTime The session's start time in milliseconds since the epoch.

Any additional properties assigned must not be prefixed by '$' and should not have embedded whitespace in the name.

When registering to receive session properties special key values of SessionControlConstants.AllFixedProperties and SessionControlConstants.AllUserProperties may be used.

Session filters Session filters are a mechanism for accessing sessions by means of a query expression. For example, it is possible to send a message to all sessions that satisfy a specified filter. Filters are parsed and evaluated at the server.

A session filter query consists of either a single search clause (example 1) or multiple search clauses connected by boolean operators (example 2):

  1. Department is "Accounts"
  2. Department is "Payroll" and Status is "Closed"

Search clauses may be linked by the boolean operators and or or. 'and' takes precedence over 'or' but parentheses may be used to override the precedence as follows:

(Department is "Accounts" or Department is "Payroll") and Status is "Closed"

The boolean not operator may be used to negate the following clause or an expression within parentheses:

  1. not Department is "Payroll"
  2. not (Department is "Payroll" or Department is "Accounts")

A search clause takes the form:

key operator value

Where key is the name of a session property and value is the property value. Only string values are currently supported and must be enclosed within either single or double quotes.

Supported operators are as follows:

Operator Description
is or eq equals
ne not equals

All operators are case insensitive.

The following are examples of valid expressions:

$Principal is "Alice" Department is "Accounts" and $Country ne "US" $Language EQ "en" and $Country NE "US" not (Department is "Accounts" or "Department is "Payroll") and $Country is "FR"

Since 5.1

Member Function Documentation

void PushTechnology.ClientInterface.Client.Session.ISession.Close ( )

Close the session.

Has no effect if the session is already closed.

Property Documentation

ISessionAttributes PushTechnology.ClientInterface.Client.Session.ISession.Attributes
get

Returns the session attributes.

IAuthenticationControl PushTechnology.ClientInterface.Client.Session.ISession.AuthenticationControl
get

Gets the 'Authentication Control' feature.

This may be used to get the feature and it will automatically instantiate the feature the first time it is called.

Returns
The authentication control feature.
IClientControl PushTechnology.ClientInterface.Client.Session.ISession.ClientControl
get

Gets the 'Client Control' feature.

This may be used to get the feature and it will automatically instantiate the feature the first time it is called.

Returns
The client control feature.
IMessaging PushTechnology.ClientInterface.Client.Session.ISession.Messaging
get

Gets the 'Messaging' feature.

This may be used to get the feature and it will automatically instantiate the feature the first time it is called.

Returns
The messaging feature.
IMessagingControl PushTechnology.ClientInterface.Client.Session.ISession.MessagingControl
get

Gets the 'Messaging Control' feature.

This may be used to get the feature and it will automatically instantiate the feature the first time it is called.

Returns
The messaging control feature.
IPings PushTechnology.ClientInterface.Client.Session.ISession.Ping
get

Gets the 'Ping' feature.

This may be used to get the feature and it will automatically instantiate the feature the first time it is called.

Returns
The ping feature.
string PushTechnology.ClientInterface.Client.Session.ISession.Principal
get

Returns the name of the security principal associated with the session.

ISecurity PushTechnology.ClientInterface.Client.Session.ISession.Security
get

Gets the 'Security' feature.

This may be used to get the feature and it will automatically instantiate the feature the first time it is called.

Returns
The security feature.
ISecurityControl PushTechnology.ClientInterface.Client.Session.ISession.SecurityControl
get

Gets the 'Security Control' feature.

This may be used to get the feature and it will automatically instantiate the feature the first time it is called.

Returns
The security control feature.
ISessionId PushTechnology.ClientInterface.Client.Session.ISession.SessionId
get

Returns the unique identifier for the session as assigned by the (first) server it connects to.

SessionState PushTechnology.ClientInterface.Client.Session.ISession.State
get

Returns the current state of the session.

ISubscriptionControl PushTechnology.ClientInterface.Client.Session.ISession.SubscriptionControl
get

Gets the 'Subscription Control' feature.

This may be used to get the feature and it will automatically instantiate the feature the first time it is called.

Returns
The subscription control feature.
ISystemAuthenticationControl PushTechnology.ClientInterface.Client.Session.ISession.SystemAuthenticationControl
get

Gets the 'System Authentication Control' feature.

This may be used to get the feature and it will automatically instantiate the feature the first time it is called.

Returns
The system authentication control feature.
ITimeSeries PushTechnology.ClientInterface.Client.Session.ISession.TimeSeries
get

Gets the 'Time Series' feature.

This may be used to get the feature and it will automatically instantiate the feature the first time it is called.

Added in version 6.1.

Returns
The time series feature.
ITopicControl PushTechnology.ClientInterface.Client.Session.ISession.TopicControl
get

Gets the 'Topic Control' feature.

This may be used to get the feature and it will automatically instantiate the feature the first time it is called.

Returns
The topic control feature.
ITopicNotifications PushTechnology.ClientInterface.Client.Session.ISession.TopicNotifications
get

Gets the 'Topic Notifications' feature.

Added in version 6.1.

Returns
The topic notifications feature.
ITopics PushTechnology.ClientInterface.Client.Session.ISession.Topics
get

Gets the 'Topics' feature.

This may be used to get the feature and it will automatically instantiate the feature the first time it is called.

Returns
The topics feature.
ITopicUpdateControl PushTechnology.ClientInterface.Client.Session.ISession.TopicUpdateControl
get

Gets the 'Topic Update Control' feature.

This may be used to get the feature and it will automatically instantiate the feature the first time it is called.

Returns
The topic update control feature.

Event Documentation

EventHandler<SessionErrorHandlerEventArgs> PushTechnology.ClientInterface.Client.Session.ISession.ErrorNotified

Notifies when an error occurs.

EventHandler<SessionListenerEventArgs> PushTechnology.ClientInterface.Client.Session.ISession.StateChanged

Notifies when the session state changes.


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