Session properties
A client session has a number of properties associated with it. Properties are key-value pairs. Both the key and the value are case sensitive.
- Send messages directly to that session or set of sessions.
For more information, see Sending request messages to a session filter.
- Subscribe that session or set of sessions to a topic.
For more information, see Managing subscriptions.
- Unsubscribe that session or set of sessions from a topic.
For more information, see Managing subscriptions.
A client session with the appropriate permissions can also view all of the session properties and modify the user-defined session properties. For more information, see Working with session properties.
Fixed properties
- $SessionId
- The session identifier.
- $Principal
- The security principal the session uses to connect to the Diffusion server.
- $Roles
- Authorization roles assigned to the session, represented as quoted strings (for example "client", "topic_control"). For more information, see Role-based authorization.
- $ClientType
- The client type of the session. For more information, see Client types.
- $Transport
- The transport the client session uses to connect to the Diffusion server. For more information, see Client types.
- $ServerName
- The name of the Diffusion server that the client connects to.
- $Connector
- The name of the connector on which the client connected to the Diffusion server.
- $Country
- The two letter country code for the country where the client's internet address is located. The value is uppercase.
- $Language
- The two letter language code for the most common language of the country where the client's internet address is located. The value is lowercase.
- $ClientIP
- The session's IP address represented as a string.
- $Latitude
- The client session's geographic latitude, if this can be ascertained.
- $Longitude
- The client session's geographic longitude, if this can be ascertained.
- $StartTime
- The client session's start time in milliseconds since the epoch.
User-defined properties
An authentication handler that allows the client session to connect can assign additional properties to the session. The keys of these properties are case sensitive, must begin with an alphabetic character, must be alphanumeric, and must not include any whitespace.
Client-proposed properties
A client can propose user-defined session properties when it opens a session. An authentication handler written with the Authenticator interface is responsible for assigning proposed properties to the session.
This page last modified: 2018/11/12