T- The type of the elements that the subscriber consumes.
R- The type of the result that the subscriber emits.
public interface CompletionSubscriber<T,R> extends org.reactivestreams.Subscriber<T>
The result is provided through a
CompletionStage, which is redeemed when the subscriber receives a
completion or error signal, or otherwise cancels the stream.
The best way to instantiate one of these is using the
of(org.reactivestreams.Subscriber<T>, java.util.concurrent.CompletionStage<R>) factory method.
|Modifier and Type||Method and Description|
Get the completion stage.
This should be redeemed by the subscriber either when it cancels, or when it receives an
Subscriber.onComplete() signal or an
Subscriber.onError(Throwable) signal. Generally, the redeemed
value or error should be the result of consuming the stream.
static <T,R> CompletionSubscriber<T,R> of(org.reactivestreams.Subscriber<T> subscriber, CompletionStage<R> completion)
CompletionSubscriberby combining the given subscriber and completion stage. The objects passed to this method should not be associated with more than one stream instance.
subscriber- The subscriber.
completion- The completion stage.
Copyright © 2019 Eclipse Foundation. All rights reserved.