Class SingleProvider
java.lang.Object
org.jboss.resteasy.rxjava2.SingleProvider
- All Implemented Interfaces:
AsyncClientResponseProvider<io.reactivex.Single<?>>
,AsyncResponseProvider<io.reactivex.Single<?>>
@Provider
public class SingleProvider
extends Object
implements AsyncResponseProvider<io.reactivex.Single<?>>, AsyncClientResponseProvider<io.reactivex.Single<?>>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.Single
<?> fromCompletionStage
(CompletionStage<?> completionStage) TurnsCompletionStage
to a reactive type.io.reactivex.Single
<?> fromCompletionStage
(Supplier<CompletionStage<?>> completionStageSupplier) TurnsCompletionStage
to a reactive type in a deferred fashion.toCompletionStage
(io.reactivex.Single<?> asyncResponse)
-
Constructor Details
-
SingleProvider
public SingleProvider()
-
-
Method Details
-
toCompletionStage
- Specified by:
toCompletionStage
in interfaceAsyncResponseProvider<io.reactivex.Single<?>>
-
fromCompletionStage
Description copied from interface:AsyncClientResponseProvider
TurnsCompletionStage
to a reactive type.- Specified by:
fromCompletionStage
in interfaceAsyncClientResponseProvider<io.reactivex.Single<?>>
- Parameters:
completionStage
- TheCompletionStage
that will produce a value.- Returns:
- T reactive type
-
fromCompletionStage
public io.reactivex.Single<?> fromCompletionStage(Supplier<CompletionStage<?>> completionStageSupplier) Description copied from interface:AsyncClientResponseProvider
TurnsCompletionStage
to a reactive type in a deferred fashion. For instance, in the case of Rx or Reactor, theSupplier.get()
will only be called when subscription happens.- Specified by:
fromCompletionStage
in interfaceAsyncClientResponseProvider<io.reactivex.Single<?>>
- Parameters:
completionStageSupplier
- TheSupplier
of aCompletionStage
that will produce a value. This allows lazy triggering of future-based APIs.- Returns:
- T reactive type
-