Class DefaultEventStream<T>
java.lang.Object
org.reactfx.ObservableBase<Consumer<? super T>, T>
org.reactfx.EventStreamBase<T>
org.reactfx.DefaultEventStream<T>
- All Implemented Interfaces:
EventStream<T>, Observable<Consumer<? super T>>, ProperEventStream<T>, ProperObservable<Consumer<? super T>, T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate booleanprivate final Tprivate final EventStream<T> private T -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidnewObserver(Consumer<? super T> observer) Called for each new observer.protected final SubscriptionStarts observing this observable's input(s), if any.Methods inherited from class ObservableBase
addObserver, enqueueNotifications, equals, forEachObserver, getObserverCount, hashCode, isObservingInputs, notifyObservers, notifyObservers, observe, removeObserver, toStringMethods inherited from interface EventStream
accumulate, 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, withDefaultEventMethods inherited from interface Observable
addObserver, observe, removeObserverMethods inherited from interface ProperEventStream
defaultNotificationAccumulator, emitMethods inherited from interface ProperObservable
defaultEquals, defaultHashCode, defaultToString, notifyObservers
-
Field Details
-
input
-
initial
-
latestEvent
-
firstObserver
private boolean firstObserver -
emitted
private boolean emitted
-
-
Constructor Details
-
DefaultEventStream
-
-
Method Details
-
newObserver
Description copied from class:ObservableBaseCalled for each new observer. Overriding this method is a convenient way for subclasses to handle this event, for example to publish some initial events.This method is called after the
ObservableBase.observeInputs()method.- Overrides:
newObserverin classObservableBase<Consumer<? super T>, T>
-
observeInputs
Description copied from class:ObservableBaseStarts observing this observable's input(s), if any. This method is called when the number of observers goes from 0 to 1. This method is called beforeObservableBase.newObserver(Object)is called for the first observer.- Specified by:
observeInputsin classObservableBase<Consumer<? super T>, T>- Returns:
- subscription used to stop observing inputs. The subscription is unsubscribed (i.e. input observation stops) when the number of observers goes down to 0.
-