Session Methods |
The Session type exposes the following members.
Name | Description | |
---|---|---|
Cancel(CorrelationID) | Cancels an outstanding request or a subscription represented by the
specified correlationId.
(Inherited from AbstractSession.) | |
Cancel(IListCorrelationID) | Cancels outstanding requests or subscriptions represented by the
specified list of correlationIds.
(Inherited from AbstractSession.) | |
Cancel(CorrelationID, String) | Cancels an outstanding request or a subscription represented by the
specified correlationId.
(Inherited from AbstractSession.) | |
Cancel(IListCorrelationID, String) | Cancels outstanding requests or subscriptions represented by the
specified list of correlationIds.
(Inherited from AbstractSession.) | |
CreateIdentity | Returns a new Identity which is valid but has not been authorized.
(Inherited from AbstractSession.) | |
createSnapshotRequestTemplate(String, CorrelationID) |
Same as calling createSnapshotRequestTemplate(
subscriptionString, statusCid, null) The session identity will be used if it's been authorized. | |
createSnapshotRequestTemplate(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. | |
CreateUserHandle | Obsolete. Deprecated since 3.3.0.0. Use CreateIdentity instead.
(Inherited from AbstractSession.) | |
DispatchEvent | 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(ISessionEventHandler),
SetEventHandler(ISessionEventHandler, EventEventType),
EventEventType (Inherited from AbstractSession.) | |
GenerateAuthorizedIdentity |
Generates an authorized Identity with the specified
authOptions and cid.
(Inherited from AbstractSession.)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. | |
GenerateToken | Return a generated token to be used for authorization.
(Inherited from AbstractSession.) | |
GenerateToken(CorrelationID) | Return a generated token to be used for authorization.
(Inherited from AbstractSession.) | |
GenerateToken(CorrelationID, IEventQueue) | Return a generated token to be used for authorization.
(Inherited from AbstractSession.) | |
GenerateToken(String, String, CorrelationID, IEventQueue) |
Return a generated token to be used for authorization.
(Inherited from AbstractSession.) | |
GetAuthorizedIdentity |
Gets the authorized Identity associated with the
specified cid.
(Inherited from AbstractSession.)If cid is omitted and the session identity is authorized, the function will return the session identity. | |
GetService |
Returns a handle to a
Service
object representing the service
identified by the specified uri.
(Inherited from AbstractSession.) | |
GetSubscriptions |
Returns an enumerable collection for iterating over the subscriptions.
| |
GetSubscriptionStatus | Returns the subscription status for the specified correlationId.
| |
GetSubscriptionString | Returns the subscription string for the specified correlationId.
| |
Init | Initialize AbstractSession. Must be called from the
constructor(s) of the derived class.
(Inherited from AbstractSession.) | |
NextEvent | Returns the next event available for processing on this session.
(Inherited from AbstractSession.) | |
NextEvent(Int64) | Returns the next event available for processing on this session.
(Inherited from AbstractSession.) | |
OpenService |
Opens the service having the specified
uri.
(Inherited from AbstractSession.) | |
OpenServiceAsync(String) | Issues an asynchronous request to open a service.
(Inherited from AbstractSession.) | |
OpenServiceAsync(String, CorrelationID) | Initiates an asynchronous request to open a service.
(Inherited from AbstractSession.) | |
Resubscribe(IListSubscription) |
This is the same as calling
Resubscribe(subscriptionList, requestLabel: null)
.
| |
Resubscribe(IListSubscription, SubscriptionPreprocessMode) |
This is the same as calling
Subscribe(subscriptionList, requestLabel: null, mode)
| |
Resubscribe(IListSubscription, Int32) |
This is the same as calling
Resubscribe(subscriptionList, resubId, requestLabel: null)
.
| |
Resubscribe(IListSubscription, String) |
Modifies each subscription in the specified subscriptionList to reflect
the modified options specified for it.
| |
Resubscribe(IListSubscription, Int32, SubscriptionPreprocessMode) |
This is the same as calling
Subscribe(subscriptionList, resubId, requestLabel: null, mode)
| |
Resubscribe(IListSubscription, Int32, String) |
Modifies each subscription in the specified subscriptionList to reflect
the modified options specified for it.
| |
Resubscribe(IListSubscription, String, SubscriptionPreprocessMode) |
Modifies each subscription in the subscriptionList
to reflect the modified options specified for it.
| |
Resubscribe(IListSubscription, Int32, String, SubscriptionPreprocessMode) |
Modifies each subscription in the subscriptionList
to reflect the modified options specified for it.
| |
SendAuthorizationRequest(Request, Identity, CorrelationID) | Sends the specified authorizationRequest and update the specified
identity with the results.
(Inherited from AbstractSession.) | |
SendAuthorizationRequest(Request, UserHandle, CorrelationID) | Obsolete. Deprecated since 3.3.0.0. Use
SendAuthorizationRequest(Request, Identity, CorrelationID)instead.
(Inherited from AbstractSession.) | |
SendAuthorizationRequest(Request, Identity, CorrelationID, String) | Sends the specified authorizationRequest and update the specified
identity with the results.
(Inherited from AbstractSession.) | |
SendAuthorizationRequest(Request, Identity, IEventQueue, CorrelationID) | Sends the specified authorizationRequest and update the specified
identity with the results.
(Inherited from AbstractSession.) | |
SendAuthorizationRequest(Request, UserHandle, CorrelationID, String) | Obsolete. Deprecated since 3.3.0.0. Use
SendAuthorizationRequest(Request, Identity, CorrelationID, String) instead.
(Inherited from AbstractSession.) | |
SendAuthorizationRequest(Request, UserHandle, IEventQueue, CorrelationID) | Obsolete. Deprecated since 3.3.0.0. Use
SendAuthorizationRequest(Request, Identity, IEventQueue, CorrelationID) instead.
(Inherited from AbstractSession.) | |
SendAuthorizationRequest(Request, Identity, IEventQueue, CorrelationID, String) | Sends the specified authorizationRequest and update the specified
identity with the results.
(Inherited from AbstractSession.) | |
SendAuthorizationRequest(Request, UserHandle, IEventQueue, CorrelationID, String) | Obsolete. Deprecated since 3.3.0.0. Use
SendAuthorizationRequest(Request, UserHandle, IEventQueue, CorrelationID, String) instead.
(Inherited from AbstractSession.) | |
SendRequest(RequestTemplate) |
Same as calling 'SendRequest(requestTemplate, null)'
| |
SendRequest(Request, CorrelationID) |
Sends the specified request to a service using this session.
The session identity will be used if it's been authorized. | |
SendRequest(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.
| |
SendRequest(Request, CorrelationID, String) |
Sends the specified request to a service using this session.
The session identity will be used if it's been authorized. | |
SendRequest(Request, Identity, CorrelationID) | Sends the specified request to a service using this session.
| |
SendRequest(Request, IEventQueue, CorrelationID) |
Sends the specified request to a service using this session.
The session identity will be used if it's been authorized. | |
SendRequest(Request, UserHandle, CorrelationID) | Obsolete. Deprecated since 3.3.0.0. Use
SendRequest(Request, Identity, CorrelationID) instead.
| |
SendRequest(Request, Identity, CorrelationID, String) | Sends the specified request to a service using this session.
| |
SendRequest(Request, Identity, IEventQueue, CorrelationID) | Sends the specified request to a service using this session.
| |
SendRequest(Request, IEventQueue, CorrelationID, String) | Sends the specified request to a service using this session.
| |
SendRequest(Request, UserHandle, CorrelationID, String) | Obsolete. Deprecated since 3.3.0.0. Use
SendRequest(Request, Identity, CorrelationID, String) instead.
| |
SendRequest(Request, UserHandle, IEventQueue, CorrelationID) | Obsolete. Deprecated since 3.3.0.0. Use
SendRequest(Request, Identity, IEventQueue, CorrelationID) instead.
| |
SendRequest(Request, Identity, IEventQueue, CorrelationID, String) | Sends the specified request to a service using this session.
| |
SendRequest(Request, UserHandle, IEventQueue, CorrelationID, String) | Obsolete. Deprecated since 3.3.0.0. Use
SendRequest(Request, Identity, IEventQueue, CorrelationID, String) instead.
| |
SetEventHandler | Set event specific event handlers | |
Start |
Issues a blocking call to start the session.
(Inherited from AbstractSession.) | |
StartAsync |
Initiates a non blocking call to start the session.
(Inherited from AbstractSession.) | |
Stop | Stops this session.
(Inherited from AbstractSession.) | |
Stop(AbstractSessionStopOption) | Stops the operation of this session.
(Inherited from AbstractSession.) | |
Subscribe(IListSubscription) |
This is the same as calling
Subscribe(subscriptionList, identity: null, requestLabel: null)
.
| |
Subscribe(IListSubscription, Identity) |
This is the same as calling
Subscribe(subscriptionList, identity, requestLabel: null)
.
| |
Subscribe(IListSubscription, SubscriptionPreprocessMode) |
This is the same as calling
Subscribe(subscriptionList, identity: null, requestLabel: null, mode)
| |
Subscribe(IListSubscription, UserHandle) | Obsolete. Deprecated since 3.3.0.0. Use
Subscribe(IListSubscription, Identity) instead.
| |
Subscribe(IListSubscription, String) |
This is the same as calling
Subscribe(subscriptionList, identity: null, requestLabel)
.
| |
Subscribe(IListSubscription, Identity, SubscriptionPreprocessMode) |
This is the same as calling
Subscribe(subscriptionList, identity, requestLabel: null, mode)
| |
Subscribe(IListSubscription, Identity, String) |
Initiates a request to receive asynchronous updates to the specified
topics in the subscriptionList.
| |
Subscribe(IListSubscription, UserHandle, String) | Obsolete. Deprecated since 3.3.0.0. Use
Subscribe(IListSubscription, Identity, String) instead.
| |
Subscribe(IListSubscription, String, SubscriptionPreprocessMode) |
This is the same as calling
Subscribe(subscriptionList, identity: null, requestLabel, mode)
| |
Subscribe(IListSubscription, Identity, String, SubscriptionPreprocessMode) |
Initiates a request to receive asynchronous updates to the specified
topics in the subscriptionList.
| |
TryNextEvent | Tries to retrieve the next event available for processing
on this session
(Inherited from AbstractSession.) | |
Unsubscribe(CorrelationID) | Obsolete. Cancels a previous request for asynchronous topic updates associated with
the specified correlationId.
| |
Unsubscribe(IListSubscription) | Cancels previous requests for asynchronous topic updates associated
with the correlation ids listed in the specified subscriptionList.
| |
Unsubscribe(IListSubscription, String) | Cancels previous requests for asynchronous topic updates associated
with the correlation ids listed in the specified subscriptionList.
|
Name | Description | |
---|---|---|
IDisposableDispose |
Dispose this Session object. It calls AbstractSession.Stop() to
close the opened socket.
(Inherited from AbstractSession.) |