the type of the objects received by the stream.
Registers a StreamListener object whose onNext method will be called whenever this stream receives a new object, and whose onError method will be called whenever this stream produces an error. This listener can later be removed by removeListener.
the listener object to be registered with this Stream
Closes the underlying stream, which will prevent the stream from receiving any more events.
Whether or not the underlying event stream is still open.
true if open, false if no
Returns the next object received from the stream.
This will not return any objects that were already received from the remote source but with no listener to process them. The object must be received from the remote source after this method is called.
a Promise containing the next object received from the stream. If there is no object yet available on the stream, the Promise will not resolve until there is.
Sets up a callback that will be called when this stream produces an error. This callback cannot be cancelled.
a function that will be called whenever this stream produces an error.
Sets up a callback that will be called when objects are received from the stream. This callback cannot be cancelled.
a function that is to be called whenever objects are received by this stream.
Unregisters a listener object previously added to this stream by addListener.
the listener object to be unregistered with this stream
Generated using TypeDoc
Stream
A Stream represents an ongoing stream of objects from a remote source, such as a MongoDB change stream as opened by a call to RemoteMongoCollection.watch.