SessionSubscribe Method (IListSubscription, Identity, String) |
Namespace: Bloomberglp.Blpapi
public void Subscribe( IList<Subscription> subscriptionList, Identity identity, string requestLabel )
Exception | Condition |
---|---|
InvalidOperationException | The session is not started. |
DuplicateCorrelationIDException | The specified correlationId is not unique. |
ArgumentException | identity was not created through this Session, or subscriptionList is null or empty, or the SubscriptionString of an entry in the subscriptionList is invalid. |
Once this has method has returned any subscriptions in the specified subscriptionList which were not given a application generated CorrelationID will have a session generated CorrelationID set. Multiple subscriptions to the same subscriptionString are valid and each will have their own, unique CorrelationID. This method should only be called after the Session has successfully started up. If an exception is thrown none of the subscriptions in the list would have been processed.
If identity is specified then the subscribe request is issued on behalf of the user represented by the handle. Use SendAuthorizationRequest to authorize an user for accessing the specified service.
Upon completion of this request a SUBSCRIPTION_STATUS event will be published for each topic in the subscription list containing a message with the result for one topic. A SubscriptionStarted message will be generated if the subscription was successfully initiated. If the subscription fails for any topic a SubscriptionFailure message containing the failure reason will be generated.