34 lines
No EOL
1.2 KiB
JavaScript
34 lines
No EOL
1.2 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.CancelDisassembler = void 0;
|
|
/**
|
|
* Streaming cancel disassembler.
|
|
*/
|
|
class CancelDisassembler {
|
|
/**
|
|
* Initializes a new instance of the [CancelDisassembler](xref:botframework-streaming.CancelDisassembler) class.
|
|
*
|
|
* @param sender The [PayloadSender](xref:botframework-streaming.PayloadSender) that this Cancel request will be sent by.
|
|
* @param id The ID of the Stream to cancel.
|
|
* @param payloadType The type of the Stream that is being cancelled.
|
|
*/
|
|
constructor(sender, id, payloadType) {
|
|
this.sender = sender;
|
|
this.id = id;
|
|
this.payloadType = payloadType;
|
|
}
|
|
/**
|
|
* Initiates the process of disassembling the request and signals the [PayloadSender](xref:botframework-streaming.PayloadSender) to begin sending.
|
|
*/
|
|
disassemble() {
|
|
const header = {
|
|
payloadType: this.payloadType,
|
|
payloadLength: 0,
|
|
id: this.id,
|
|
end: true,
|
|
};
|
|
this.sender.sendPayload(header);
|
|
}
|
|
}
|
|
exports.CancelDisassembler = CancelDisassembler;
|
|
//# sourceMappingURL=cancelDisassembler.js.map
|