Package org.reactfx
Interface Observable<O>
-
- Type Parameters:
O
- observer type accepted by this Observable
- All Known Subinterfaces:
AwaitingEventStream<T>
,CompletionStageStream<T>
,ConnectableEventStream<T>
,EventStream<T>
,LiveList<E>
,MemoizationList<E>
,ProperEventStream<T>
,ProperLiveList<E>
,ProperObservable<O,T>
,ProperVal<T>
,SuspendableEventStream<T>
,SuspendableList<E>
,SuspendableVal<T>
,SuspendableVar<T>
,SuspenderStream<T,S>
,TaskStream<T>
,Toggle
,Val<T>
,Var<T>
- All Known Implementing Classes:
AbstractReducibleEventStream
,AccumulateBetweenStream
,AccumulateUntilLaterStream
,AccumulatingStream
,AccumulativeEventStream
,AnimatedVal
,Await
,AwaitLatest
,ConnectableEventSource
,ConstVal
,DefaultEventStream
,DistinctStream
,DynamicallyMappedList
,EmitBothOnEachStream
,EmitOnEachStream
,EmitOnStream
,EventSource
,EventStreamBase
,EventStreams.Never
,FilterMapStream
,FilterStream
,FlatMapOptStream
,FlatMapped
,FlatMappedVal
,FlatMappedVar
,FlatMapStream
,ForgetfulEventStream
,HookStream
,LatestNStream
,ListRangeReduction
,ListReduction
,LiveArrayList
,LiveListBase
,MappedList
,MappedStream
,MappedToCompletionStageStream
,MappedToTaskStream
,MappedVal
,MemoizationListImpl
,MemoizationListImpl.MemoizedView
,ObservableBase
,OrElse
,OrElseConst
,PausableEventStream
,ProxyObservable
,ProxyVal
,RecursiveStream
,ReducibleEventStream
,RepeatOnStream
,RigidObservable
,SimpleVar
,StatefulStream
,StateStream
,SuccessionReducingStream
,SuppressibleEventStream
,SuspendableBase
,SuspendableBoolean
,SuspendableEventStreamBase
,SuspendableListWrapper
,SuspendableNo
,SuspendableValWrapper
,SuspendableVarWrapper
,SuspendableYes
,SuspendedWhenStream
,SuspenderBase
,SuspenderStreamImpl
,ThenAccumulateForStream
,ThreadBridge
,ToggleFromVal
,ValAsList
,ValBase
,ValWrapper
,VarFromVal
,VarWrapper
public interface Observable<O>
Anything that can be observed, that is have an observer added and removed. Each Observable has one canonical observer type, which can be added by theaddObserver(Object)
method and removed by theremoveObserver(Object)
method, or added by theobserve(Object)
method and removed by the returned Subscription. In specific subtypes, methods for adding/removing canonical observers may have aliases that are more descriptive for the specific type, for example, inEventStream
, observe(Object) is aliased as EventStream.subscribe(java.util.function.Consumer), or inVal
, addObserver(Object) is aliased as Val.addInvalidationObserver(java.util.function.Consumer). In addition to the canonical observer, subtypes may support adding other observer types. These other observers will be wrapped to "look like" a canonical observer. For example, the canonical observer forVal<T>
is an invalidation observer, which is of typeConsumer<? super T>
, which accepts the invalidated value. In addition to this canonical observer, Val also supportsInvalidationListener
s andChangeListener
s.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
addObserver(O observer)
default Subscription
observe(O observer)
void
removeObserver(O observer)
-
-
-
Method Detail
-
addObserver
void addObserver(O observer)
-
removeObserver
void removeObserver(O observer)
-
observe
default Subscription observe(O observer)
-
-