-
Notifications
You must be signed in to change notification settings - Fork 16
/
StreamManager.yml
130 lines (130 loc) · 4.55 KB
/
StreamManager.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
### YamlMime:TSType
name: StreamManager
uid: botframework-streaming.StreamManager
package: botframework-streaming
summary: Orchestrates and manages streams.
fullName: StreamManager
remarks: ''
isPreview: false
isDeprecated: false
type: class
constructors:
- name: 'StreamManager((contentStreamAssembler: PayloadAssembler) => void)'
uid: botframework-streaming.StreamManager.constructor
package: botframework-streaming
summary: >-
Initializes a new instance of the
[StreamManager](xref:botframework-streaming.StreamManager) class.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
new StreamManager(onCancelStream: (contentStreamAssembler:
PayloadAssembler) => void)
parameters:
- id: onCancelStream
type: '(contentStreamAssembler: PayloadAssembler) => void'
description: |
Function to trigger if the managed stream is cancelled.
methods:
- name: closeStream(string)
uid: botframework-streaming.StreamManager.closeStream
package: botframework-streaming
summary: >-
Closes the
[PayloadAssembler](xref:botframework-streaming.PayloadAssembler) assigned
to the
[SubscribableStream](xref:botframework-streaming.SubscribableStream) with
the given ID.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function closeStream(id: string)'
parameters:
- id: id
type: string
description: >
The ID of the
[SubscribableStream](xref:botframework-streaming.SubscribableStream)
to close.
- name: getPayloadAssembler(string)
uid: botframework-streaming.StreamManager.getPayloadAssembler
package: botframework-streaming
summary: >-
Retrieves a
[PayloadAssembler](xref:botframework-streaming.PayloadAssembler) with the
given ID if one exists, otherwise a new instance is created and assigned
the given ID.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function getPayloadAssembler(id: string): PayloadAssembler'
parameters:
- id: id
type: string
description: >-
The ID of the
[PayloadAssembler](xref:botframework-streaming.PayloadAssembler) to
retrieve or create.
return:
description: >-
The [PayloadAssembler](xref:botframework-streaming.PayloadAssembler)
with the given ID.
type: <xref uid="botframework-streaming.PayloadAssembler" />
- name: getPayloadStream(IHeader)
uid: botframework-streaming.StreamManager.getPayloadStream
package: botframework-streaming
summary: >-
Retrieves the
[SubscribableStream](xref:botframework-streaming.SubscribableStream) from
the [PayloadAssembler](xref:botframework-streaming.PayloadAssembler) this
manager manages.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function getPayloadStream(header: IHeader): SubscribableStream'
parameters:
- id: header
type: <xref uid="botframework-streaming.IHeader" />
description: >-
The Header of the
[SubscribableStream](xref:botframework-streaming.SubscribableStream)
to retrieve.
return:
description: >-
The
[SubscribableStream](xref:botframework-streaming.SubscribableStream)
with the given header.
type: <xref uid="botframework-streaming.SubscribableStream" />
- name: 'onReceive(IHeader, SubscribableStream, number)'
uid: botframework-streaming.StreamManager.onReceive
package: botframework-streaming
summary: >-
Used to set the behavior of the managed
[PayloadAssembler](xref:botframework-streaming.PayloadAssembler) when data
is received.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
function onReceive(header: IHeader, contentStream: SubscribableStream,
contentLength: number)
parameters:
- id: header
type: <xref uid="botframework-streaming.IHeader" />
description: The Header of the stream.
- id: contentStream
type: <xref uid="botframework-streaming.SubscribableStream" />
description: >-
The
[SubscribableStream](xref:botframework-streaming.SubscribableStream)
to write incoming data to.
- id: contentLength
type: number
description: |
The amount of data to write to the contentStream.