@Provider public class SingleProvider extends Object implements AsyncResponseProvider<io.reactivex.Single<?>>, AsyncClientResponseProvider<io.reactivex.Single<?>>
| Constructor and Description |
|---|
SingleProvider() |
| Modifier and Type | Method and Description |
|---|---|
io.reactivex.Single<?> |
fromCompletionStage(CompletionStage<?> completionStage)
Turns
CompletionStage to a reactive type. |
io.reactivex.Single<?> |
fromCompletionStage(Supplier<CompletionStage<?>> completionStageSupplier)
Turns
CompletionStage to a reactive type in a deferred fashion. |
CompletionStage<?> |
toCompletionStage(io.reactivex.Single<?> asyncResponse) |
public CompletionStage<?> toCompletionStage(io.reactivex.Single<?> asyncResponse)
toCompletionStage in interface AsyncResponseProvider<io.reactivex.Single<?>>public io.reactivex.Single<?> fromCompletionStage(CompletionStage<?> completionStage)
AsyncClientResponseProviderCompletionStage to a reactive type.fromCompletionStage in interface AsyncClientResponseProvider<io.reactivex.Single<?>>completionStage - The CompletionStage that will produce a value.public io.reactivex.Single<?> fromCompletionStage(Supplier<CompletionStage<?>> completionStageSupplier)
AsyncClientResponseProviderCompletionStage to a reactive type in a deferred fashion. For instance, in the case of
Rx or Reactor, the Supplier.get() will only be called when subscription happens.fromCompletionStage in interface AsyncClientResponseProvider<io.reactivex.Single<?>>completionStageSupplier - The Supplier of a CompletionStage that will produce a value.
This allows lazy triggering of future-based APIs.Copyright © 2020 JBoss by Red Hat. All rights reserved.