public final class ConnectableEventSource<T> extends EventStreamBase<T> implements ConnectableEventStream<T>, ConnectableEventSink<T>
| Constructor and Description |
|---|
ConnectableEventSource() |
| Modifier and Type | Method and Description |
|---|---|
Subscription |
connectTo(EventStream<? extends T> input)
Connects this connectable object to
source event stream. |
protected Subscription |
observeInputs()
Starts observing this observable's input(s), if any.
|
void |
push(T value) |
addObserver, enqueueNotifications, equals, forEachObserver, getObserverCount, hashCode, isObservingInputs, newObserver, notifyObservers, notifyObservers, observe, removeObserver, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaccumulate, accumulate, accumulate, accumulateBetween, accumulateBetween, accumulateUntilLater, accumulateUntilLater, accumulateUntilLater, accumulateUntilLater, accumulateWhen, accumulateWhen, accumulative, accumulative, cast, conditionOn, conditionOnShowing, distinct, emitBothOnEach, emitOn, emitOnEach, feedTo, feedTo, filter, filter, filterMap, filterMap, flatMap, forgetful, fork, guardedBy, hook, latestN, map, mapToCompletionStage, mapToTask, onRecurseAccumulate, onRecurseAccumulate, onRecurseQueue, onRecurseReduce, onRecurseRetainLatest, or, pausable, pauseWhen, pin, queueBetween, queueUntilLater, queueUntilLater, reduceBetween, reduceSuccessions, reduceSuccessions, reduceSuccessions, reduceSuccessions, reduceSuccessions, reduceSuccessions, reduceUntilLater, reduceUntilLater, reduceWhen, reducible, repeatOn, retainLatestBetween, retainLatestUntilLater, retainLatestUntilLater, retainLatestWhen, splitBy, subscribe, subscribeFor, subscribeForOne, successionEnds, successionEnds, supply, supply, supplyCompletionStage, supplyTask, suppressible, suppressWhen, suspenderOf, thenAccumulateFor, thenAccumulateFor, thenAccumulateFor, thenAccumulateFor, thenIgnoreFor, thenIgnoreFor, thenReduceFor, thenReduceFor, thenRetainLatestFor, thenRetainLatestFor, threadBridge, threadBridgeFromFx, threadBridgeToFx, toBinding, withDefaultEventaddObserver, observe, removeObserverdefaultNotificationAccumulator, emitdefaultEquals, defaultHashCode, defaultToString, notifyObserverspublic Subscription connectTo(EventStream<? extends T> input)
Connectablesource event stream.
Implementations of this method should subscribe to source
lazily, i.e. only subscribe to source when necessary, e.g.
when the connectable object itself is being observed (e.g. itself
has at least one subscriber).
A Connectable may be connected to multiple sources at
the same time.
connectTo in interface Connectable<T>input - event stream to (lazily) connect to.source.protected final Subscription observeInputs()
ObservableBaseObservableBase.newObserver(Object)
is called for the first observer.observeInputs in class ObservableBase<java.util.function.Consumer<? super T>,T>