CompositeEventSink<T> class

A composite event sink that forwards events to multiple target sinks.

This class is useful when you have a single source of events but need to broadcast those events to multiple destinations (sinks). It implements EventSink and distributes add, addError, and close calls to all provided child sinks.

Implemented types
Available extensions

Constructors

CompositeEventSink(Iterable<EventSink<T>> sinks, {bool throwOnClosed = false, ExceptionStrategy exceptionStrategy = ExceptionStrategy.failFast})
Creates a new composite event sink that forwards events to the provided sinks.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(T data) → void
Adds a data event to the sink.
override
addError(Object error, [StackTrace? stackTrace]) → void
Adds an error to the sink.
override
close() → void
Closes the sink.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
tryAdd(T event, {bool ignoreError = false, void onError(Object error, StackTrace stackTrace)?}) → void

Available on Sink<T>, provided by the OnSink extension

tryAddError(Object error, {StackTrace? stackTrace, bool ignoreError = false, void onError(Object error, StackTrace stackTrace)?}) → void

Available on EventSink<T>, provided by the OnEventSink extension

Operators

operator ==(Object other) bool
The equality operator.
inherited