IProviderSession Methods |
The IProviderSession type exposes the following members.
Name | Description | |
---|---|---|
ActivateSubServiceCodeRange |
Activates sub-service code range of an already registered service.
| |
Cancel(CorrelationID) |
Cancels an outstanding request or a subscription.
(Inherited from IAbstractSession.) | |
Cancel(IListCorrelationID) |
This is the same as calling Cancel(CorrelationID, String)
with a null request label.
(Inherited from IAbstractSession.) | |
Cancel(CorrelationID, String) |
Cancels an outstanding request or a subscription.
(Inherited from IAbstractSession.) | |
Cancel(IListCorrelationID, String) |
Cancels outstanding requests or subscriptions.
(Inherited from IAbstractSession.)Cancels a previous request or subscription for asynchronous topic updates associated with each CorrelationID in correlators. Upon return, no further message will be generated for those requests or subscriptions. For asynchronous sessions, a handler may still be processing an existing message for the associated request or subscription after the call returns. While iterating over an event, if any message is encountered for a cancelled CorrelationID, it will be silently ignored, but if the message was iterated to just prior to the completion of the cancel request it will be delivered, it is up to the application developer to handle this condition. If any of the specified CorrelationIds do not refer to an "active" request or Subscription then, that particular CorrelationID will be ignored. Once this call returns, the specified CorrelationID can be reused for new requests to this session. Also note that application developers should generally be cautious not to reuse a CorrelationID until all existing references within their applications have been cleared. Depending on the use of the CorrelationID, this can possibly result in accessing application resources which are no longer available. | |
CreateIdentity |
Creates a new Identity which is valid but has not
been authorized.
(Inherited from IAbstractSession.)Create a handle to represent a user of services. For using services with the specific user's credentials the identity should be authorized with the corresponding authorization service. | |
CreateTopics(ITopicList) |
This is the same as calling
CreateTopics(ITopicList, ResolveMode, Identity)
with DONT_REGISTER_SERVICES and null
Identity.
| |
CreateTopics(ITopicList, ResolveMode) |
This is the same as calling
CreateTopics(ITopicList, ResolveMode, Identity)
with null Identity.
| |
CreateTopics(ITopicList, ResolveMode, Identity) |
Creates the topics in topicList and updates
the entries with the results of the creation and resolution process.
Before this method returns one or more RESOLUTION_STATUS events and, if resolveMode is AUTO_REGISTER_SERVICES, zero or more SERVICE_STATUS events are generated. If this is an asynchronous session then these events may be processed by the registered EventHandler before this method has returned. | |
CreateTopicsAsync(ITopicList) |
This is the same as calling
CreateTopicsAsync(ITopicList, ResolveMode, Identity)
with DONT_REGISTER_SERVICES and null
Identity.
| |
CreateTopicsAsync(ITopicList, ResolveMode) |
This is the same as calling
CreateTopicsAsync(ITopicList, ResolveMode, Identity)
with null Identity.
| |
CreateTopicsAsync(ITopicList, ResolveMode, Identity) |
Begins the creation of topics.
Before this method returns one or more RESOLUTION_STATUS events and, if resolveMode is AUTO_REGISTER_SERVICES, zero or more SERVICE_STATUS events are generated. If this is an asynchronous session then these events may be processed by the registered EventHandler before this method has returned. | |
DeactivateSubServiceCodeRange |
De-activates the specified sub-service code range from an already
registered service.
| |
DeleteTopic |
Removes one reference from topic.
If this function has been called the same number of times that topic was created by CreateTopics(ITopicList), then topic is deleted. A 'TopicDeleted' message is delivered, preceded by 'TopicDeactivated' if topic was subscribed. A provider must not publish a message on a deleted topic. The Topic to be deleted.The topic must not be deleted more times than it has been created. | |
DeleteTopics |
Deletes each topic in topics.
| |
DeregisterService |
Deregisters a service.
The identity in the service registration is reused to verify permissions for deregistration. If the service is in pending registration, cancels the pending registration. If the service is registered, sends a deregistration request; generates TOPIC_STATUS events containing a TopicUnsubscribed message for each subscribed topic, a TopicDeactivated message for each active topic and a TopicDeleted for each created topic; generates REQUEST_STATUS events containing a RequestFailure message for each pending incoming request; and generates a SERVICE_STATUS event containing a ServiceDeregistered message. All published events on topics created on this service will be ignored after this method returns. | |
GenerateAuthorizedIdentity |
Generates an authorized Identity with the specified
authOptions and cid.
(Inherited from IAbstractSession.)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 |
This is the same as calling
GenerateToken(String, String, CorrelationID, IEventQueue)
with all null arguments.
(Inherited from IAbstractSession.) | |
GenerateToken(CorrelationID) |
This is the same as calling
GenerateToken(String, String, CorrelationID, IEventQueue)
with a null user ID and IP address and a null IEventQueue.
(Inherited from IAbstractSession.) | |
GenerateToken(CorrelationID, IEventQueue) |
This is the same as calling
GenerateToken(String, String, CorrelationID, IEventQueue)
with a null user ID and IP address.
(Inherited from IAbstractSession.) | |
GenerateToken(String, String, CorrelationID, IEventQueue) |
Generate a token to be used for authorization.
(Inherited from IAbstractSession.)Valid authentication options must have been specified in the SessionOptions. | |
GetAuthorizedIdentity |
Gets an authorized Identity.
A CorrelationID that maps to an authorized
Identity.
(Inherited from IAbstractSession.)If cid is omitted and the session identity is authorized, the function will return the session identity. An authorized identity must be mapped to cid. If cid is omitted the session identity must have been authorized. | |
GetService |
Gets the Service object.
(Inherited from IAbstractSession.) | |
GetTopic | ||
NextEvent |
This is the same as NextEvent(Int64) with
0 milliseconds.
(Inherited from IAbstractSession.) | |
NextEvent(Int64) |
Returns the next event available for processing on this session.
(Inherited from IAbstractSession.)If no event is available immediately wait for timeoutMillis milliseconds for an event to arrive. If no event is received before the timeout expires return a TIMEOUT event. If the timeout specified is 0 then wait for an infinite amount of time for an event to be received. Note that this function cannot be called on a session that is operating in "asynchronous" mode. That is a session that was constructed with an EventHandler. An EventHandler must not have been provided at construction. | |
OpenService |
Opens the service.
(Inherited from IAbstractSession.) | |
OpenServiceAsync(String) |
Issues an asynchronous request to open a service.
(Inherited from IAbstractSession.) | |
OpenServiceAsync(String, CorrelationID) |
Initiates an asynchronous request to open a service.
(Inherited from IAbstractSession.)Once the request has completed, a SERVICE_STATUS event will be generated indicating the result of the request. The correlationId will be returned in generated message. It can also be used to cancel this request before it completes by calling Cancel(CorrelationID). | |
Publish |
Publish the specified eventToPublish.
eventToPublish must be a publish type. | |
RegisterService(String, Identity) |
This is the same as calling
RegisterService(String, Identity, ServiceRegistrationOptions)
with null ServiceRegistrationOptions.
| |
RegisterService(String, Identity, ServiceRegistrationOptions) |
Attempts to register the service and blocks until the service is
either registered successfully or has failed to be registered.
This method does not return until a SERVICE_STATUS event has been generated. Note that if the session was created in asynchronous mode, the event may be processed before the function returns. When providerIdentity is null the session identity will be used if it's been authorized. | |
RegisterServiceAsync(String, Identity) |
This is the same calling
RegisterServiceAsync(String, Identity, CorrelationID, ServiceRegistrationOptions)
with null ServiceRegistrationOptions and null CorrelationID.
| |
RegisterServiceAsync(String, Identity, CorrelationID) |
This is the same as calling
RegisterServiceAsync(String, Identity, CorrelationID, ServiceRegistrationOptions)
with null ServiceRegistrationOptions.
| |
RegisterServiceAsync(String, Identity, ServiceRegistrationOptions) |
This is the same as calling
RegisterServiceAsync(String, Identity, CorrelationID, ServiceRegistrationOptions)
with null CorrelationID.
| |
RegisterServiceAsync(String, Identity, CorrelationID, ServiceRegistrationOptions) |
Begins the process of registering a service and and returns
immediately.
The application must monitor events for a SERVICE_STATUS event which will be generated once the service has been successfully registered or registration has failed. When providerIdentity is null the session identity will be used if it's been authorized. | |
Resolve(IResolutionList) |
This is the same as calling
Resolve(IResolutionList, ResolveMode, Identity)
with DONT_REGISTER_SERVICES and null
Identity.
| |
Resolve(IResolutionList, ResolveMode) |
This is the same as calling
Resolve(IResolutionList, ResolveMode, Identity)
with null Identity.
| |
Resolve(IResolutionList, ResolveMode, Identity) |
Resolves a list of topics and updates them with the results of the
resolution process.
Before this method returns one or more RESOLUTION_STATUS events and, if resolveMode is AUTO_REGISTER_SERVICES, zero or more SERVICE_STATUS events are generated. If this is an asynchronous session then these events may be processed by the registered EventHandler before this method has returned. | |
ResolveAsync(IResolutionList) |
This is the same as calling
ResolveAsync(IResolutionList, ResolveMode, Identity)
with DONT_REGISTER_SERVICES and null
Identity.
| |
ResolveAsync(IResolutionList, ResolveMode) |
This is the same as calling
ResolveAsync(IResolutionList, ResolveMode, Identity)
with null Identity.
| |
ResolveAsync(IResolutionList, ResolveMode, Identity) |
Begins the resolution of topics.
Before this method returns one or more RESOLUTION_STATUS events and, if resolveMode is AUTO_REGISTER_SERVICES, zero or more SERVICE_STATUS events are generated. If this is an asynchronous session then these events may be processed by the registered EventHandler before this method has returned. | |
SendAuthorizationRequest(Request, Identity, CorrelationID) |
This is the same as calling
SendAuthorizationRequest(Request, Identity, IEventQueue, CorrelationID, String)
with a null IEventQueue and null request label.
(Inherited from IAbstractSession.) | |
SendAuthorizationRequest(Request, Identity, CorrelationID, String) |
This is the same as calling
SendAuthorizationRequest(Request, Identity, IEventQueue, CorrelationID, String)
with a null IEventQueue.
(Inherited from IAbstractSession.) | |
SendAuthorizationRequest(Request, Identity, IEventQueue, CorrelationID) |
This is the same as calling
SendAuthorizationRequest(Request, Identity, IEventQueue, CorrelationID, String)
with a null request label.
(Inherited from IAbstractSession.) | |
SendAuthorizationRequest(Request, Identity, IEventQueue, CorrelationID, String) |
Authorizes an identity.
(Inherited from IAbstractSession.)This request can be used by applications to authorize users to receive data from services. If a user is successfully authorized all the entitlements for that user are cached locally. Once authorized the identity can be used to make subscriptions and requests as the user. If an IEventQueue is specified then all response events for this Authorization Request are published to this event queue. The user can block on this event queue for responses and can use this as a mechanism to convert this asynchronous request into a synchronous request. An Event will be published containing a message with the result of the authorization request. If the user was successfully authorized an "AuthorizationSuccess" message will be generated. If the user was not authorized an "AuthorizationFailure" message will be generated. | |
SendResponse(Event) |
This is the same as calling
SendResponse(Event, Boolean)
with false.
| |
SendResponse(Event, Boolean) |
Sends a response event for a previously received request.
| |
SetEventHandler |
Sets an EventHandler to use for specific EventEventType
types.
| |
Start |
Issues a blocking call to start the session.
(Inherited from IAbstractSession.)A SESSION_STATUS event may be published containing a message with the result of the request. If the session was started successfully a "SessionStarted" message will be generated. If the start failed a "SessionStartupFailure" message may be generated. Note: If this is an asynchronous session then the SESSION_STATUS event may be processed by the registered EventHandler before this method has returned. If this session is using an external EventDispatcher it should be already started. A session must only be started once. | |
StartAsync |
Initiates a non blocking call to start the session.
(Inherited from IAbstractSession.)On completion of this request a SESSION_STATUS event is published containing a message with the result of the request. If the session was started successfully a "SessionStarted" message will be generated. If the start failed a "SessionStartupFailure" message will be generated. Note: If this is an asynchronous session then the SESSION_STATUS may be processed by the registered EventHandler before this method has returned. If this session is using an external EventDispatcher it should be already started. A session must only be started once. | |
Stop |
This is the same as calling
Stop(AbstractSessionStopOption)
with SYNC.
(Inherited from IAbstractSession.) | |
Stop(AbstractSessionStopOption) |
Stops this session.
(Inherited from IAbstractSession.) | |
TryNextEvent |
Retrieves the next event available for processing on this session.
(Inherited from IAbstractSession.)This method never blocks. An EventHandler must not have been provided at construction. |