Class StreamingOperation<RequestType, ResponseType, OutboundMessageType, InboundMessageType>

Implementation of a bi-direction streaming operation.

TODO: may change slightly for uni-directional operations

Type Parameters

  • RequestType

  • ResponseType

  • OutboundMessageType

  • InboundMessageType

Hierarchy

  • EventEmitter
    • StreamingOperation

Methods

  • Activates a streaming operation

    Returns Promise<ResponseType>

  • Asynchronous close method for the underlying event stream. The user should call this function when finished with the operation in order to clean up native resources. Failing to do so will cause the native resources to persist until the client is closed. If the client is never closed then every unclosed operation will leak.

    Returns Promise<void>

  • Parameters

    Returns StreamingOperation<RequestType, ResponseType, OutboundMessageType, InboundMessageType>

  • Parameters

    Returns StreamingOperation<RequestType, ResponseType, OutboundMessageType, InboundMessageType>

  • Parameters

    • event: "message"
    • listener: ((message) => void)
        • (message): void
        • Parameters

          • message: InboundMessageType

          Returns void

    Returns StreamingOperation<RequestType, ResponseType, OutboundMessageType, InboundMessageType>

  • Sends an outbound message on a streaming operation, if the operation allows outbound streaming messages.

    Parameters

    • message: OutboundMessageType

      modeled data to send

    Returns Promise<void>

Events

ENDED: string = 'ended'

Event emitted when the operation's stream has ended. Only emitted if the stream was successfully activated.

Listener type: StreamingOperationEndedListener

MESSAGE: string = 'message'

Event emitted when an incoming eventstream message is successfully deserialized into a modeled inbound streaming shape type.

STREAM_ERROR: string = 'streamError'

Event emitted when an incoming eventstream message resulted in some kind of error. Usually this is either a modeled service error or a deserialization error for messages that cannot be mapped to the service model.

Listener type: StreamingRpcErrorListener

Generated using TypeDoc