63 lines
No EOL
2.8 KiB
TypeScript
63 lines
No EOL
2.8 KiB
TypeScript
/**
|
|
* @module botframework-streaming
|
|
*/
|
|
/**
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License.
|
|
*/
|
|
import { PayloadAssembler } from './assemblers/payloadAssembler';
|
|
import { RequestManager } from './payloads/requestManager';
|
|
import { PayloadReceiver } from './payloadTransport/payloadReceiver';
|
|
import { PayloadSender } from './payloadTransport/payloadSender';
|
|
import { RequestHandler } from './requestHandler';
|
|
import { StreamingRequest } from './streamingRequest';
|
|
import { IReceiveResponse, IReceiveRequest } from './interfaces';
|
|
/**
|
|
* Creates a protocol adapter for Streaming.
|
|
*/
|
|
export declare class ProtocolAdapter {
|
|
private readonly requestHandler;
|
|
private readonly payloadSender;
|
|
private readonly payloadReceiver;
|
|
private readonly requestManager;
|
|
private readonly sendOperations;
|
|
private readonly streamManager;
|
|
private readonly assemblerManager;
|
|
/**
|
|
* Creates a new instance of the protocol adapter class.
|
|
*
|
|
* @param requestHandler The [RequestHandler](xref:botframework-streaming.RequestHandler) that will process incoming requests.
|
|
* @param requestManager The [RequestManager](xref:botframework-streaming.RequestManager) that will process outgoing requests.
|
|
* @param sender The [PayloadSender](xref:botframework-streaming.PayloadSender) for use with outgoing requests.
|
|
* @param receiver The [PayloadReceiver](xref:botframework-streaming.PayloadReceiver) for use with incoming requests.
|
|
*/
|
|
constructor(requestHandler: RequestHandler, requestManager: RequestManager, sender: PayloadSender, receiver: PayloadReceiver);
|
|
/**
|
|
* Sends a request over the attached request manager.
|
|
*
|
|
* @param request The outgoing request to send.
|
|
* @returns The response to the specified request.
|
|
*/
|
|
sendRequest(request: StreamingRequest): Promise<IReceiveResponse>;
|
|
/**
|
|
* Executes the receive pipeline when a request comes in.
|
|
*
|
|
* @param id The id the resources created for the response will be assigned.
|
|
* @param request The incoming request to process.
|
|
*/
|
|
onReceiveRequest(id: string, request: IReceiveRequest): Promise<void>;
|
|
/**
|
|
* Executes the receive pipeline when a response comes in.
|
|
*
|
|
* @param id The id the resources created for the response will be assigned.
|
|
* @param response The incoming response to process.
|
|
*/
|
|
onReceiveResponse(id: string, response: IReceiveResponse): Promise<void>;
|
|
/**
|
|
* Executes the receive pipeline when a cancellation comes in.
|
|
*
|
|
* @param contentStreamAssembler The payload assembler processing the incoming data that this cancellation request targets.
|
|
*/
|
|
onCancelStream(contentStreamAssembler: PayloadAssembler): void;
|
|
}
|
|
//# sourceMappingURL=protocolAdapter.d.ts.map
|