Click or drag to resize
Session Methods

The Session type exposes the following members.

Methods
  NameDescription
Public methodCancel(CorrelationID)
Cancels an outstanding request or a subscription represented by the specified correlationId.
(Inherited from AbstractSession.)
Public methodCancel(IListCorrelationID)
Cancels outstanding requests or subscriptions represented by the specified list of correlationIds.
(Inherited from AbstractSession.)
Public methodCancel(CorrelationID, String)
Cancels an outstanding request or a subscription represented by the specified correlationId.
(Inherited from AbstractSession.)
Public methodCancel(IListCorrelationID, String)
Cancels outstanding requests or subscriptions represented by the specified list of correlationIds.
(Inherited from AbstractSession.)
Public methodCreateIdentity
Returns a new Identity which is valid but has not been authorized.
(Inherited from AbstractSession.)
Public methodcreateSnapshotRequestTemplate(String, CorrelationID)
Same as calling createSnapshotRequestTemplate( subscriptionString, statusCid, null)

The session identity will be used if it's been authorized.

Public methodcreateSnapshotRequestTemplate(String, CorrelationID, Identity)
Create a snapshot service request template for getting subscription data specified by the 'subscriptionString' using the optionally specified 'identity' if all the following conditions are met: the session is established, 'subscriptionString' is a valid subscription string and 'statusCid' is not used in this session. If one or more conditions are not met, an exception is thrown. The provided 'statusCid' will be used for an implied subscription associated with the create request template. The created request template status updates will be delivered using ADMIN events.

The benefit of the snapshot service request templates is that these requests may be serviced from a cache and the user may expect to see significantly lower response time.

There are 3 possible states for a created request template: 'Pending', 'Available', and 'Terminated'. A 'RequestTemplate' is initially in the 'Pending' state.

The user may send a request using a template that is in 'Pending' state. If this succeeds, the state of that template changes to 'Available'. Note that response times to receive data may be longer than a response time for a request in the 'Available' state since request caches may not yet have been established. A template may transition back into 'Pending' state from the 'Available' state, in which case a 'RequestTemplatePending' message will be generated.

If state is 'Available', all requests will be serviced from a cache and the user may expect to see significantly reduced latency. Note, that a snapshot request template can transition out of the 'Available' state concurrently with requests being sent, so no guarantee of service from the cache can be provided. Request template may transition into 'Available' state only from the 'Pending' state. In this case the 'RequestTemplateAvailable' message is generated. This message will also contain information about currently used connection in the 'boundTo' field. Note that it is possible to get the 'RequestTemplateAvailable' message with a new connection information, even if a request template is already in the 'Available' state.

If state is 'Terminated', sending request will always result in a failure response. Request template may transition into this state from any other state. This is a final state and it is guaranteed that the last message associated with the provided 'statusCid' will be the 'RequestTemplateTerminated' message which is generated when a request template transitions into this state. If a request template transitions into this state, all outstanding requests will be failed and appropriate messages will be generated for each request. After receiving the 'RequestTemplateTerminated' message, 'statusCid' may be reused.

Note that resources used by a snapshot service request template are released only when request template transitions into the 'Terminated' state or when session is destroyed. In order to release resources when request template is not needed anymore, user should call Cancel(CorrelationID) or close unless the 'RequestTemplateTerminated' message was already received due to some problems. If the 'Session.cancel' method is used, all outstanding requests are canceled and the underlying subscription is closed immediately. If the handle is closed with the 'RequestTemplate.close' method, the underlying subscription is closed only when all outstanding requests are served. Note that it is possible to have a situation when response contain data that were sent by a backend before user actually sends a request template. For example it is possible if user requested data were already in an incoming TCP queue.

Public methodCreateUserHandle Obsolete. (Inherited from AbstractSession.)
Protected methodDispatchEvent
Dispatch event with event handler if it has been set otherwise do nothing. Event handlers are set by a library client in case of async session. SetEventHandler(SessionEventHandler), SetEventHandler(SessionEventHandler, EventEventType), EventEventType
(Inherited from AbstractSession.)
Public methodGenerateAuthorizedIdentity
Generates an authorized Identity with the specified authOptions and cid.

One or more AUTHORIZATION_STATUS events, zero or more TOKEN_STATUS events and zero or more SERVICE_STATUS events are generated. If this is an asynchronous AbstractSession then an Event may be processed by the registered EventHandler before GenerateAuthorizedIdentity(AuthOptions, CorrelationID) has returned.

The behavior is undefined when authOptions is null.

(Inherited from AbstractSession.)
Public methodGenerateToken
Return a generated token to be used for authorization.
(Inherited from AbstractSession.)
Public methodGenerateToken(CorrelationID)
Return a generated token to be used for authorization.
(Inherited from AbstractSession.)
Public methodGenerateToken(CorrelationID, IEventQueue)
Return a generated token to be used for authorization.
(Inherited from AbstractSession.)
Public methodGenerateToken(String, String, CorrelationID, IEventQueue)
Return a generated token to be used for authorization.
(Inherited from AbstractSession.)
Public methodGetAuthorizedIdentity
Gets the authorized Identity associated with the specified cid.

If cid is omitted and the session identity is authorized, the function will return the session identity.

(Inherited from AbstractSession.)
Public methodGetService
Returns a handle to a Service object representing the service identified by the specified uri.
(Inherited from AbstractSession.)
Public methodGetSubscriptions
Returns an enumerable collection for iterating over the subscriptions.
Public methodGetSubscriptionStatus
Returns the subscription status for the specified correlationId.
Public methodGetSubscriptionString
Returns the subscription string for the specified correlationId.
Protected methodInit
Initialize AbstractSession. Must be called from the constructor(s) of the derived class.
(Inherited from AbstractSession.)
Public methodNextEvent
Returns the next event available for processing on this session.
(Inherited from AbstractSession.)
Public methodNextEvent(Int64)
Returns the next event available for processing on this session.
(Inherited from AbstractSession.)
Public methodOpenService
Opens the service having the specified uri.
(Inherited from AbstractSession.)
Public methodOpenServiceAsync(String)
Issues an asynchronous request to open a service.
(Inherited from AbstractSession.)
Public methodOpenServiceAsync(String, CorrelationID)
Initiates an asynchronous request to open a service.
(Inherited from AbstractSession.)
Public methodResubscribe(IListSubscription)
Modifies each subscription in the specified subscriptionList to reflect the modified options specified for it.
Public methodResubscribe(IListSubscription, Int32)
Modifies each subscription in the specified subscriptionList to reflect the modified options specified for it.
Public methodResubscribe(IListSubscription, String)
Modifies each subscription in the specified subscriptionList to reflect the modified options specified for it.
Public methodResubscribe(IListSubscription, Int32, String)
Modifies each subscription in the specified subscriptionList to reflect the modified options specified for it.
Public methodSendAuthorizationRequest(Request, Identity, CorrelationID)
Sends the specified authorizationRequest and update the specified identity with the results.
(Inherited from AbstractSession.)
Public methodSendAuthorizationRequest(Request, UserHandle, CorrelationID) Obsolete.
Deprecated since 3.3.0.0. Use SendAuthorizationRequest(Request, Identity, CorrelationID)instead.
(Inherited from AbstractSession.)
Public methodSendAuthorizationRequest(Request, Identity, CorrelationID, String)
Sends the specified authorizationRequest and update the specified identity with the results.
(Inherited from AbstractSession.)
Public methodSendAuthorizationRequest(Request, Identity, IEventQueue, CorrelationID)
Sends the specified authorizationRequest and update the specified identity with the results.
(Inherited from AbstractSession.)
Public methodSendAuthorizationRequest(Request, UserHandle, CorrelationID, String) Obsolete. (Inherited from AbstractSession.)
Public methodSendAuthorizationRequest(Request, UserHandle, IEventQueue, CorrelationID) Obsolete. (Inherited from AbstractSession.)
Public methodSendAuthorizationRequest(Request, Identity, IEventQueue, CorrelationID, String)
Sends the specified authorizationRequest and update the specified identity with the results.
(Inherited from AbstractSession.)
Public methodSendAuthorizationRequest(Request, UserHandle, IEventQueue, CorrelationID, String) Obsolete. (Inherited from AbstractSession.)
Public methodSendRequest(RequestTemplate)
Same as calling 'SendRequest(requestTemplate, null)'
Public methodSendRequest(Request, CorrelationID)
Sends the specified request to a service using this session.

The session identity will be used if it's been authorized.

Public methodSendRequest(RequestTemplate, CorrelationID)
Send a request defined by the specified 'requestTemplate'. If the optionally specified 'correlationId' is supplied, use it otherwise create a new 'CorrelationId'. The actual 'CorrelationId' used is returned. A successful request will generate zero or more 'PARTIAL_RESPONSE' events followed by exactly one 'RESPONSE' event. Once the final 'RESPONSE' event has been received the 'CorrelationId' associated with this request may be re-used. If the request fails at any stage a 'REQUEST_STATUS' will be generated after which the 'CorrelationId' associated with the request may be re-used.
Public methodSendRequest(Request, CorrelationID, String)
Sends the specified request to a service using this session.

The session identity will be used if it's been authorized.

Public methodSendRequest(Request, Identity, CorrelationID)
Sends the specified request to a service using this session.
Public methodSendRequest(Request, IEventQueue, CorrelationID)
Sends the specified request to a service using this session.

The session identity will be used if it's been authorized.

Public methodSendRequest(Request, UserHandle, CorrelationID) Obsolete.
Deprecated since 3.3.0.0. Use SendRequest(Request, Identity, CorrelationID) instead.
Public methodSendRequest(Request, Identity, CorrelationID, String)
Sends the specified request to a service using this session.
Public methodSendRequest(Request, Identity, IEventQueue, CorrelationID)
Sends the specified request to a service using this session.
Public methodSendRequest(Request, IEventQueue, CorrelationID, String)
Sends the specified request to a service using this session.
Public methodSendRequest(Request, UserHandle, CorrelationID, String) Obsolete.
Deprecated since 3.3.0.0. Use SendRequest(Request, Identity, CorrelationID, String) instead.
Public methodSendRequest(Request, UserHandle, IEventQueue, CorrelationID) Obsolete.
Deprecated since 3.3.0.0. Use SendRequest(Request, Identity, IEventQueue, CorrelationID) instead.
Public methodSendRequest(Request, Identity, IEventQueue, CorrelationID, String)
Sends the specified request to a service using this session.
Public methodSendRequest(Request, UserHandle, IEventQueue, CorrelationID, String) Obsolete.
Public methodSetEventHandler
Set event specific event handlers
Public methodStart
Issues a blocking call to start the session.
(Inherited from AbstractSession.)
Public methodStartAsync
Initiates a non blocking call to start the session.
(Inherited from AbstractSession.)
Public methodStop
Stops this session.
(Inherited from AbstractSession.)
Public methodStop(AbstractSessionStopOption)
Stops the operation of this session.
(Inherited from AbstractSession.)
Public methodSubscribe(IListSubscription)
Initiates a request to receive asynchronous updates to the specified topics.

The session identity will be used if it's been authorized.

Public methodSubscribe(IListSubscription, Identity)
Initiates a request to receive asynchronous updates to the specified topics.
Public methodSubscribe(IListSubscription, UserHandle) Obsolete.
Public methodSubscribe(IListSubscription, String)
Initiates a request to receive asynchronous updates to the specified topics.

The session identity will be used if it's been authorized.

Public methodSubscribe(IListSubscription, Identity, String)
Initiates a request to receive asynchronous updates to the specified topics in the subscriptionList.
Public methodSubscribe(IListSubscription, UserHandle, String) Obsolete.
Public methodTryNextEvent
Tries to retrieve the next event available for processing on this session
(Inherited from AbstractSession.)
Public methodUnsubscribe(CorrelationID) Obsolete.
Cancels a previous request for asynchronous topic updates associated with the specified correlationId.
Public methodUnsubscribe(IListSubscription)
Cancels previous requests for asynchronous topic updates associated with the correlation ids listed in the specified subscriptionList.
Public methodUnsubscribe(IListSubscription, String)
Cancels previous requests for asynchronous topic updates associated with the correlation ids listed in the specified subscriptionList.
Top
Explicit Interface Implementations
  NameDescription
Explicit interface implementationPrivate methodIDisposableDispose
Dispose this Session object. It calls AbstractSession.Stop() to close the opened socket.
(Inherited from AbstractSession.)
Top
See Also