Top Methods
org.reactfx

public Interface CompletionStageStream<T>

extends EventStream<CompletionStage<T>>
Known Direct Implementers
org.reactfx.MappedToCompletionStageStream
Imports
java.util.concurrent.CompletionStage, .Executor, javafx.application.Platform, org.reactfx.util.Try

Method Summary

Modifier and TypeMethod and Description
public default AwaitingEventStream<Try<T>>
await()

Returns a new stream that emits the results of completions stages emitted from this stream when they become available.

public default AwaitingEventStream<Try<T>>
await(Executor
single-thread executor that executes actions on the same thread on which this event stream lives.
clientThreadExecutor
)

A variant of await() for streams that do not live on the JavaFX application thread.

public default AwaitingEventStream<Try<T>>
awaitLatest()

Similar to await(), with one difference: for completion stages s1 and s2 emitted from this stream in this order, if s2 arrives before s1 is completed, then the result of s1 is discarded (i.e. not emitted from the returned stream).

public default AwaitingEventStream<Try<T>>
awaitLatest(Executor
single-thread executor that executes actions on the same thread on which this event stream lives.
clientThreadExecutor
)

A variant of awaitLatest() for streams that do not live on the JavaFX application thread.

public default AwaitingEventStream<Try<T>>
awaitLatest(EventStream<?>
An event from this stream causes the currently expected result (if any) to be discarded. It can be used to signal that a new completion stage will arrive from this stream shortly, which makes the currently expected result outdated.
canceller
)

Similar to awaitLatest(), with one addition: When an event is emitted from canceller, if the completion stage most recently emitted from this stream has not yet completed, its result is discarded (i.e. not emitted from the returned stream).

public default AwaitingEventStream<Try<T>>
awaitLatest(EventStream<?> canceller, Executor
single-thread executor that executes actions on the same thread on which this event stream lives.
clientThreadExecutor
)

A variant of awaitLatest(EventStream) for streams that do not live on the JavaFX application thread.

Inherited from org.reactfx.EventStream:
accumulateaccumulateaccumulateaccumulateBetweenaccumulateBetweenaccumulateUntilLateraccumulateUntilLateraccumulateUntilLateraccumulateUntilLateraccumulateWhenaccumulateWhenaccumulativeaccumulativecastconditionOnconditionOnShowingdistinctemitBothOnEachemitOnemitOnEachfeedTofeedTofilterfilterfilterMapfilterMapflatMapforgetfulforkguardedByhooklatestNmapmapToCompletionStagemapToTaskonRecurseAccumulateonRecurseAccumulateonRecurseQueueonRecurseReduceonRecurseRetainLatestorpausablepauseWhenpinqueueBetweenqueueUntilLaterqueueUntilLaterreduceBetweenreduceSuccessionsreduceSuccessionsreduceSuccessionsreduceSuccessionsreduceSuccessionsreduceSuccessionsreduceUntilLaterreduceUntilLaterreduceWhenreduciblerepeatOnretainLatestBetweenretainLatestUntilLaterretainLatestUntilLaterretainLatestWhensplitBysubscribesubscribeForsubscribeForOnesuccessionEndssuccessionEndssupplysupplysupplyCompletionStagesupplyTasksuppressiblesuppressWhensuspenderOfthenAccumulateForthenAccumulateForthenAccumulateForthenAccumulateForthenIgnoreForthenIgnoreForthenReduceForthenReduceForthenRetainLatestForthenRetainLatestForthreadBridgethreadBridgeFromFxthreadBridgeToFxtoBindingwithDefaultEvent

Method Detail

awaitback to summary
public default AwaitingEventStream<Try<T>> await()

Returns a new stream that emits the results of completions stages emitted from this stream when they become available.

Note that results from the returned stream may arrive in different order than the completion stages emitted from this stream, due to asynchrony.

If a completion stage emitted by this stream fails with exception e, Try.failure(e) is emitted from the returned stream.

awaitback to summary
public default AwaitingEventStream<Try<T>> await(Executor clientThreadExecutor)

A variant of await() for streams that do not live on the JavaFX application thread.

Parameters
clientThreadExecutor:Executor

single-thread executor that executes actions on the same thread on which this event stream lives.

See Also
await()
awaitLatestback to summary
public default AwaitingEventStream<Try<T>> awaitLatest()

Similar to await(), with one difference: for completion stages s1 and s2 emitted from this stream in this order, if s2 arrives before s1 is completed, then the result of s1 is discarded (i.e. not emitted from the returned stream).

See Also
await()
awaitLatestback to summary
public default AwaitingEventStream<Try<T>> awaitLatest(Executor clientThreadExecutor)

A variant of awaitLatest() for streams that do not live on the JavaFX application thread.

Parameters
clientThreadExecutor:Executor

single-thread executor that executes actions on the same thread on which this event stream lives.

See Also
awaitLatest()
awaitLatestback to summary
public default AwaitingEventStream<Try<T>> awaitLatest(EventStream<?> canceller)

Similar to awaitLatest(), with one addition: When an event is emitted from canceller, if the completion stage most recently emitted from this stream has not yet completed, its result is discarded (i.e. not emitted from the returned stream).

Parameters
canceller:EventStream<?>

An event from this stream causes the currently expected result (if any) to be discarded. It can be used to signal that a new completion stage will arrive from this stream shortly, which makes the currently expected result outdated.

See Also
awaitLatest()
awaitLatestback to summary
public default AwaitingEventStream<Try<T>> awaitLatest(EventStream<?> canceller, Executor clientThreadExecutor)

A variant of awaitLatest(EventStream) for streams that do not live on the JavaFX application thread.

Parameters
clientThreadExecutor:Executor

single-thread executor that executes actions on the same thread on which this event stream lives.

See Also
awaitLatest(EventStream)