RequestManager class
Orchestrates and manages pending streaming requests.
Methods
get |
Constructs and returns a response for this request. |
pending |
Gets the count of the pending requests. |
signal |
Signal fired when all response tasks have completed. |
Method Details
getResponse(string)
Constructs and returns a response for this request.
function getResponse(requestId: string): Promise<IReceiveResponse>
Parameters
- requestId
-
string
The ID of the StreamingRequest being responded to.
Returns
Promise<IReceiveResponse>
The response to the specified request.
pendingRequestCount()
Gets the count of the pending requests.
function pendingRequestCount(): number
Returns
number
Number with the pending requests count.
signalResponse(string, IReceiveResponse)
Signal fired when all response tasks have completed.
function signalResponse(requestId: string, response: IReceiveResponse): Promise<boolean>
Parameters
- requestId
-
string
The ID of the StreamingRequest.
- response
- IReceiveResponse
The IReceiveResponse in response to the request.
Returns
Promise<boolean>
A Promise that when completed returns true
if the requestId
's pending response task was completed, otherwise false
.