TWSStreamDelegate Protocol Reference
Conforms to | NSObject |
---|---|
Declared in | TWSStream.h |
Overview
The delegate delivers events that are fired by the Message Stream as a result of asynchronous completion of locally invoked methods, or any remote operations triggered by other actors on the same Stream.
– onStreamResultOpened:
Called when the message stream is opened or created.
- (void)onStreamResultOpened:(nonnull TWSStream *)stream
Parameters
stream |
The reference to the message stream. |
---|
Discussion
Called when the message stream is opened or created.
Declared In
TWSStream.h
– onStream:resultRemovedForFlowID:
Called when the stream is removed as a result of a local operation.
- (void)onStream:(nonnull TWSStream *)stream resultRemovedForFlowID:(NSUInteger)flowId
Parameters
stream |
The reference to the message stream. |
---|---|
flowId |
A developer specified identifier for this remote request. |
Discussion
Called when the stream is removed as a result of a local operation.
Declared In
TWSStream.h
– onStream:resultMessagePublished:forFlowID:
Called when the stream message is published as a result of a local operation.
- (void)onStream:(nonnull TWSStream *)stream resultMessagePublished:(nonnull NSString *)messageSID forFlowID:(NSUInteger)flowId
Parameters
stream |
The reference to the message stream. |
---|---|
messageSID |
The SID of the published message. |
flowId |
A developer specified identifier for this remote request. |
Discussion
Called when the stream message is published as a result of a local operation.
Declared In
TWSStream.h
– onStream:resultErrorOccurred:forFlowID:
Called when an error occurs as a result of a local operation.
- (void)onStream:(nonnull TWSStream *)stream resultErrorOccurred:(nonnull TWSError *)error forFlowID:(NSUInteger)flowId
Parameters
stream |
The reference to the message stream. |
---|---|
error |
The error encounted. The error object will include the error status code, extended error code and and error message. |
flowId |
A developer specified identifier for this remote request. |
Discussion
Called when an error occurs as a result of a local operation.
This event is fired whenever any Message Stream errors occur, typically resulting from a locally requested operation. Notable error conditions include stream being non-existent, inaccessible or message publications rate being too high.
Declared In
TWSStream.h
– onStream:remoteMessagePublished:
Called when a message is published to the stream as a result of a remote operation.
- (void)onStream:(nonnull TWSStream *)stream remoteMessagePublished:(nonnull TWSStreamMessage *)streamMessage
Parameters
stream |
The reference to the message stream. |
---|---|
streamMessage |
The stream message. |
Discussion
Called when a message is published to the stream as a result of a remote operation.
Declared In
TWSStream.h
– onStreamRemoteRemoved:
Called when the stream is removed as a result of a remote operation.
- (void)onStreamRemoteRemoved:(nonnull TWSStream *)stream
Parameters
stream |
The reference to the removed message stream. |
---|
Discussion
Called when the stream is removed as a result of a remote operation.
Declared In
TWSStream.h