Class MonoProvider
java.lang.Object
org.jboss.resteasy.reactor.MonoProvider
- All Implemented Interfaces:
AsyncClientResponseProvider<reactor.core.publisher.Mono<?>>
,AsyncResponseProvider<reactor.core.publisher.Mono<?>>
@Provider
public class MonoProvider
extends Object
implements AsyncResponseProvider<reactor.core.publisher.Mono<?>>, AsyncClientResponseProvider<reactor.core.publisher.Mono<?>>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono
<?> fromCompletionStage
(CompletionStage<?> completionStage) TurnsCompletionStage
to a reactive type.reactor.core.publisher.Mono
<?> fromCompletionStage
(Supplier<CompletionStage<?>> completionStageSupplier) TurnsCompletionStage
to a reactive type in a deferred fashion.toCompletionStage
(reactor.core.publisher.Mono<?> asyncResponse)
-
Constructor Details
-
MonoProvider
public MonoProvider()
-
-
Method Details
-
toCompletionStage
- Specified by:
toCompletionStage
in interfaceAsyncResponseProvider<reactor.core.publisher.Mono<?>>
-
fromCompletionStage
Description copied from interface:AsyncClientResponseProvider
TurnsCompletionStage
to a reactive type.- Specified by:
fromCompletionStage
in interfaceAsyncClientResponseProvider<reactor.core.publisher.Mono<?>>
- Parameters:
completionStage
- TheCompletionStage
that will produce a value.- Returns:
- T reactive type
-
fromCompletionStage
public reactor.core.publisher.Mono<?> 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<reactor.core.publisher.Mono<?>>
- Parameters:
completionStageSupplier
- TheSupplier
of aCompletionStage
that will produce a value. This allows lazy triggering of future-based APIs.- Returns:
- T reactive type
-