Click or drag to resize
IProviderSession Interface
A session that can be used for providing services.

Namespace:  Bloomberglp.Blpapi
Assembly:  Bloomberglp.Blpapi (in Bloomberglp.Blpapi.dll) Version: 3.24.11.1
Syntax
public interface IProviderSession : IAbstractSession, 
	IDisposable

The IProviderSession type exposes the following members.

Methods
  NameDescription
Public methodActivateSubServiceCodeRange
Activates sub-service code range of an already registered service.
Public methodCancel(CorrelationID)
Cancels an outstanding request or a subscription.
(Inherited from IAbstractSession.)
Public methodCancel(IListCorrelationID)
This is the same as calling Cancel(CorrelationID, String) with a null request label.
(Inherited from IAbstractSession.)
Public methodCancel(CorrelationID, String)
Cancels an outstanding request or a subscription.
(Inherited from IAbstractSession.)
Public methodCancel(IListCorrelationID, String)
Cancels outstanding requests or subscriptions.

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.

(Inherited from IAbstractSession.)
Public methodCreateIdentity
Creates a new Identity which is valid but has not been authorized.

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.

(Inherited from IAbstractSession.)
Public methodCreateTopics(ITopicList)
Public methodCreateTopics(ITopicList, ResolveMode)
This is the same as calling CreateTopics(ITopicList, ResolveMode, Identity) with null Identity.
Public methodCreateTopics(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.

Public methodCreateTopicsAsync(ITopicList)
Public methodCreateTopicsAsync(ITopicList, ResolveMode)
This is the same as calling CreateTopicsAsync(ITopicList, ResolveMode, Identity) with null Identity.
Public methodCreateTopicsAsync(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.

Public methodDeactivateSubServiceCodeRange
De-activates the specified sub-service code range from an already registered service.
Public methodDeleteTopic
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.

Public methodDeleteTopics
Deletes each topic in topics.
Public methodDeregisterService
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.

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 IAbstractSession.)
Public methodGenerateToken
This is the same as calling GenerateToken(String, String, CorrelationID, IEventQueue) with all null arguments.
(Inherited from IAbstractSession.)
Public methodGenerateToken(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.)
Public methodGenerateToken(CorrelationID, IEventQueue)
This is the same as calling GenerateToken(String, String, CorrelationID, IEventQueue) with a null user ID and IP address.
(Inherited from IAbstractSession.)
Public methodGenerateToken(String, String, CorrelationID, IEventQueue)
Generate a token to be used for authorization.

Valid authentication options must have been specified in the SessionOptions.

(Inherited from IAbstractSession.)
Public methodGetAuthorizedIdentity
Gets an authorized Identity. A CorrelationID that maps to an authorized Identity.

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.

(Inherited from IAbstractSession.)
Public methodGetService
Gets the Service object.
(Inherited from IAbstractSession.)
Public methodGetTopic
Finds a previously created Topic related to a Message.
Public methodNextEvent
This is the same as NextEvent(Int64) with 0 milliseconds.
(Inherited from IAbstractSession.)
Public methodNextEvent(Int64)
Returns the next event available for processing on this session.

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.
(Inherited from IAbstractSession.)
Public methodOpenService
Opens the service.
(Inherited from IAbstractSession.)
Public methodOpenServiceAsync(String)
Issues an asynchronous request to open a service.
(Inherited from IAbstractSession.)
Public methodOpenServiceAsync(String, CorrelationID)
Initiates an asynchronous request to open a service.

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).

(Inherited from IAbstractSession.)
Public methodPublish
Publish the specified eventToPublish.

eventToPublish must be a publish type.

Public methodRegisterService(String, Identity)
Public methodRegisterService(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.

Public methodRegisterServiceAsync(String, Identity)
Public methodRegisterServiceAsync(String, Identity, CorrelationID)
Public methodRegisterServiceAsync(String, Identity, ServiceRegistrationOptions)
Public methodRegisterServiceAsync(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.

Public methodResolve(IResolutionList)
Public methodResolve(IResolutionList, ResolveMode)
This is the same as calling Resolve(IResolutionList, ResolveMode, Identity) with null Identity.
Public methodResolve(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.

Public methodResolveAsync(IResolutionList)
Public methodResolveAsync(IResolutionList, ResolveMode)
This is the same as calling ResolveAsync(IResolutionList, ResolveMode, Identity) with null Identity.
Public methodResolveAsync(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.

Public methodSendAuthorizationRequest(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.)
Public methodSendAuthorizationRequest(Request, Identity, CorrelationID, String) (Inherited from IAbstractSession.)
Public methodSendAuthorizationRequest(Request, Identity, IEventQueue, CorrelationID)
This is the same as calling SendAuthorizationRequest(Request, Identity, IEventQueue, CorrelationID, String) with a null request label.
(Inherited from IAbstractSession.)
Public methodSendAuthorizationRequest(Request, Identity, IEventQueue, CorrelationID, String)
Authorizes an identity.

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.

(Inherited from IAbstractSession.)
Public methodSendResponse(Event)
This is the same as calling SendResponse(Event, Boolean) with false.
Public methodSendResponse(Event, Boolean)
Sends a response event for a previously received request.
Public methodSetEventHandler
Public methodStart
Issues a blocking call to start the session.

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.

(Inherited from IAbstractSession.)
Public methodStartAsync
Initiates a non blocking call to start the session.

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.

(Inherited from IAbstractSession.)
Public methodStop (Inherited from IAbstractSession.)
Public methodStop(AbstractSessionStopOption)
Stops this session.
(Inherited from IAbstractSession.)
Public methodTryNextEvent
Retrieves the next event available for processing on this session.

This method never blocks.

An EventHandler must not have been provided at construction.
(Inherited from IAbstractSession.)
Top
See Also