Package de.xima.fc.proma.context
Interface IPublicPromaCallInvokerAsync
- All Superinterfaces:
IPublicPromaCallInvoker
A
IPublicPromaCallInvoker that provides the result in an asynchronous, non-blocking fashion.- Since:
- 8.0.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T,R> Void extractResultAsync(StageChain<T, R> responseStage, Function<? super T, ? extends R> fn, Duration timeout) Extracts the result from a response stage in an asynchronous fashion by discarding the result once the stage completes.<T,R> Void extractResultAsync(StageChain<T, R> responseStage, Function<? super T, ? extends R> fn, Duration timeout, BiConsumer<? super R, Throwable> action) Extracts the result from a response stage in an asynchronous fashion by invoking the callback once the stage completes normally or exceptionally.default <T> VoidextractResultAsync(StageChain<T, T> responseStage, Duration timeout) Extracts the result from a response stage in an asynchronous fashion by discarding the result once the stage completes.default <T> VoidextractResultAsync(StageChain<T, T> responseStage, Duration timeout, BiConsumer<? super T, Throwable> action) Extracts the result from a response stage in an asynchronous fashion by invoking the callback once the stage completes normally or exceptionally.Methods inherited from interface de.xima.fc.proma.context.IPublicPromaCallInvoker
invoke, invoke
-
Method Details
-
extractResultAsync
default <T,R> Void extractResultAsync(StageChain<T, R> responseStage, Function<? super T, ? extends R> fn, Duration timeout) Extracts the result from a response stage in an asynchronous fashion by discarding the result once the stage completes.- Type Parameters:
T- Type of the intermediate result.R- Type of the final result.- Parameters:
fn- A function for converting the intermediate result into the final result if the stage has not yet returned.responseStage- The response stage from which to extract the result.timeout- The timeout until the stage completes exceptionally with aTimeoutExceptionif stage does not complete otherwise within that time frame.- Returns:
null
-
extractResultAsync
<T,R> Void extractResultAsync(StageChain<T, R> responseStage, Function<? super T, ? extends R> fn, Duration timeout, BiConsumer<? super R, Throwable> action) Extracts the result from a response stage in an asynchronous fashion by invoking the callback once the stage completes normally or exceptionally.- Type Parameters:
T- Type of the intermediate result.R- Type of the final result.- Parameters:
fn- A function for converting the intermediate result into the final result if the stage has not yet returned.responseStage- The response stage from which to extract the result.timeout- The timeout until the stage completes exceptionally with aTimeoutExceptionif stage does not complete otherwise within that time frame.action- Callback that is invoked with either the result or the error once the stage completes or times out.- Returns:
null
-
extractResultAsync
Extracts the result from a response stage in an asynchronous fashion by discarding the result once the stage completes.- Type Parameters:
T- Type of the intermediate and final result.- Parameters:
responseStage- The response stage from which to extract the result.timeout- The timeout until the stage completes exceptionally with aTimeoutExceptionif stage does not complete otherwise within that time frame.- Returns:
null
-
extractResultAsync
default <T> Void extractResultAsync(StageChain<T, T> responseStage, Duration timeout, BiConsumer<? super T, Throwable> action) Extracts the result from a response stage in an asynchronous fashion by invoking the callback once the stage completes normally or exceptionally.- Type Parameters:
T- Type of the intermediate and final result.- Parameters:
responseStage- The response stage from which to extract the result.timeout- The timeout until the stage completes exceptionally with aTimeoutExceptionif stage does not complete otherwise within that time frame.action- Callback that is invoked with either the result or the error once the stage completes or times out.- Returns:
null
-