StreamingAgent
Represents a streaming object to interact with streaming platforms. Add the following line to your scenario code to use the class:
require(Modules.StreamingAgent);
Methods
addEventListener
addEventListener(event: , callback: Function
): void
Adds a handler for the specified event triggered by a streaming object.
Parameters
event:
Streaming event, e.g., StreamError.
callback:
Function
Handler function that can take one parameter – the object with event information
Returns
type:
void
removeEventListener
removeEventListener(event: , callback: Function
): void
Removes a handler for the specified event triggered by a streaming object.
Parameters
event:
Streaming event, e.g., StreamError.
callback:
Function
OptionalHandler function that can take one parameter – the object with event information
Returns
type:
void
stop
stop(): void
Stops streaming. Triggers the StreamStopped event. You must not call any other streaming methods after a StreamingAgent.stop call.
Returns
type:
void