Package org.jboss.resteasy.spi
Interface AsyncClientResponseProvider<T>
- All Known Implementing Classes:
MonoProvider,SingleProvider
public interface AsyncClientResponseProvider<T>
Used to turn a CompletionStage into another reactive class.
Can be used for implementing RxInvokers for other suitable classes.
-
Method Summary
Modifier and TypeMethodDescriptionfromCompletionStage(CompletionStage<?> completionStage) TurnsCompletionStageto a reactive type.fromCompletionStage(Supplier<CompletionStage<?>> completionStageSupplier) TurnsCompletionStageto a reactive type in a deferred fashion.
-
Method Details
-
fromCompletionStage
TurnsCompletionStageto a reactive type.- Parameters:
completionStage- TheCompletionStagethat will produce a value.- Returns:
- T reactive type
-
fromCompletionStage
TurnsCompletionStageto 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.- Parameters:
completionStageSupplier- TheSupplierof aCompletionStagethat will produce a value. This allows lazy triggering of future-based APIs.- Returns:
- T reactive type
-