Package org.jboss.resteasy.rxjava2
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
Constructors Constructor Description SingleProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.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.CompletionStage<?>
toCompletionStage(io.reactivex.Single<?> asyncResponse)
-
-
-
Method Detail
-
toCompletionStage
public CompletionStage<?> toCompletionStage(io.reactivex.Single<?> asyncResponse)
- Specified by:
toCompletionStage
in interfaceAsyncResponseProvider<io.reactivex.Single<?>>
-
fromCompletionStage
public io.reactivex.Single<?> fromCompletionStage(CompletionStage<?> completionStage)
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
-
-