A object that accepts stream events both synchronously and asynchronously.
A StreamSink unifies the asynchronous methods from StreamConsumer and the synchronous methods from EventSink.
The EventSink methods can't be used while the addStream is called. As soon as the addStream's Future completes with a value, the EventSink methods can be used again.
If addStream is called after any of the EventSink methods, it'll be delayed until the underlying system has consumed the data added by the EventSink methods.
When EventSink methods are used, the [done] [Future] can be used to catch any errors.
When close is called, it will return the [done] [Future].
- Implements
-
- EventSink<S>
- StreamConsumer<S>
- Implemented by
Constructors
Properties
Operators
-
operator ==(
other) → bool -
The equality operator.…
inherited
Methods
-
add(
S event) → void -
Send a data event to a stream.
inherited -
addError(
errorEvent, [StackTrace stackTrace]) → void -
Send an async error to a stream.
inherited -
addStream(
Stream<S> stream) → -
Consumes the elements of
stream
.…inherited -
close(
) → -
Tells the stream sink that no futher streams will be added.…
-
noSuchMethod(
Invocation invocation) → dynamic -
noSuchMethod is invoked when users invoke a non-existent method on an object. The name of the method and the arguments of the invocation are passed to noSuchMethod in an Invocation. If noSuchMethod returns a value, that value becomes the result of the original invocation.…
inherited -
toString(
) → String -
Returns a string representation of this object.
inherited