Package org.reactfx
Class AwaitLatest<T,F>
java.lang.Object
- All Implemented Interfaces:
AwaitingEventStream<Try<T>>
,EventStream<Try<T>>
,Observable<Consumer<? super Try<T>>>
,ProperEventStream<Try<T>>
,ProperObservable<Consumer<? super Try<T>>,
Try<T>>
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.value.ObservableBooleanValue
Indicates whether there is a pending event that will be emitted by this stream in the (near) future. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BiConsumer
<F, TriConsumer<T, Throwable, Boolean>> private final EventStream
<?> private F
private javafx.beans.binding.BooleanBinding
private long
private final EventStream
<F> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
AwaitLatest
(EventStream<F> source, EventStream<?> cancelImpulse, Consumer<F> canceller, BiConsumer<F, TriConsumer<T, Throwable, Boolean>> addCompletionHandler) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> AwaitingEventStream
<Try<T>> awaitCompletionStage
(EventStream<CompletionStage<T>> source, Executor clientThreadExecutor) static <T> AwaitingEventStream
<Try<T>> awaitCompletionStage
(EventStream<CompletionStage<T>> source, EventStream<?> cancelImpulse, Executor clientThreadExecutor) static <T> AwaitingEventStream
<Try<T>> awaitTask
(EventStream<javafx.concurrent.Task<T>> source) static <T> AwaitingEventStream
<Try<T>> awaitTask
(EventStream<javafx.concurrent.Task<T>> source, EventStream<?> cancelImpulse) boolean
protected Subscription
Starts observing this observable's input(s), if any.javafx.beans.value.ObservableBooleanValue
Indicates whether there is a pending event that will be emitted by this stream in the (near) future.private final long
replaceExpected
(F newExpected) private void
setExpected
(F newExpected) Methods inherited from class org.reactfx.ObservableBase
addObserver, enqueueNotifications, equals, forEachObserver, getObserverCount, hashCode, isObservingInputs, newObserver, notifyObservers, notifyObservers, observe, removeObserver, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.reactfx.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, withDefaultEvent
Methods inherited from interface org.reactfx.Observable
addObserver, observe, removeObserver
Methods inherited from interface org.reactfx.ProperEventStream
defaultNotificationAccumulator, emit
Methods inherited from interface org.reactfx.ProperObservable
defaultEquals, defaultHashCode, defaultToString, notifyObservers
-
Property Details
-
pending
public javafx.beans.value.ObservableBooleanValue pendingProperty- Specified by:
pendingProperty
in interfaceAwaitingEventStream<T>
- Returns:
- the
pending
property - See Also:
-
-
Field Details
-
source
-
cancelImpulse
-
canceller
-
addCompletionHandler
-
revision
private long revision -
expectedFuture
-
pending
private javafx.beans.binding.BooleanBinding pending
-
-
Constructor Details
-
AwaitLatest
private AwaitLatest(EventStream<F> source, EventStream<?> cancelImpulse, Consumer<F> canceller, BiConsumer<F, TriConsumer<T, Throwable, Boolean>> addCompletionHandler)
-
-
Method Details
-
awaitCompletionStage
public static <T> AwaitingEventStream<Try<T>> awaitCompletionStage(EventStream<CompletionStage<T>> source, Executor clientThreadExecutor) -
awaitTask
public static <T> AwaitingEventStream<Try<T>> awaitTask(EventStream<javafx.concurrent.Task<T>> source) -
awaitCompletionStage
public static <T> AwaitingEventStream<Try<T>> awaitCompletionStage(EventStream<CompletionStage<T>> source, EventStream<?> cancelImpulse, Executor clientThreadExecutor) -
awaitTask
public static <T> AwaitingEventStream<Try<T>> awaitTask(EventStream<javafx.concurrent.Task<T>> source, EventStream<?> cancelImpulse) -
pendingProperty
public javafx.beans.value.ObservableBooleanValue pendingProperty()Description copied from interface:AwaitingEventStream
Indicates whether there is a pending event that will be emitted by this stream in the (near) future. This may mean that an event has occurred that causes this stream to emit an event with some delay, e.g. waiting for a timer or completion of an asynchronous task.- Specified by:
pendingProperty
in interfaceAwaitingEventStream<T>
- Returns:
- the
pending
property
-
isPending
public boolean isPending()- Specified by:
isPending
in interfaceAwaitingEventStream<T>
-
observeInputs
Description copied from class:ObservableBase
Starts 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:
observeInputs
in classObservableBase<Consumer<? super Try<T>>,
Try<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.
-
replaceExpected
-
setExpected
-