SessionSendRequest Method (Request, Identity, EventQueue, CorrelationID, String) |
Namespace: Bloomberglp.Blpapi
public CorrelationID SendRequest( Request request, Identity identity, EventQueue eventQueue, CorrelationID correlationId, string requestLabel )
Exception | Condition |
---|---|
InvalidOperationException | The session is not started. |
InvalidRequestException | The request is not compliant with the schema for the request. |
RequestQueueOverflowException | This session has too many enqueued requests. |
DuplicateCorrelationIDException | The specified correlationId is already active for this Session. |
This method sends the specified request to a service that is available on this session. The specified correlationId is returned on the response and can be used to correlate the response to this request. If a null correlationId is specified then an internal CorrelationID is generated and returned.
If a valid identity is specified then it used as authorization for the specified request. If a valid identity is not specified then the request runs with the session authorization. SendAuthorizationRequest for more information.
If an eventQueue is specified then all response events for this Request are published to this eventQueue. The user can block on this event queue for response and can use this as a mechanism to convert this asynchronous request into a synchronous request.
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 event will be generated after which the CorrelationId associated with the request may be re-used.