Interface IPublicPromaCallInvokerAsync

All Superinterfaces:
IPublicPromaCallInvoker

public interface IPublicPromaCallInvokerAsync extends 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 Type
    Method
    Description
    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.
    <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> Void
    extractResultAsync(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> 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.

    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 a TimeoutException if 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 a TimeoutException if 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

      default <T> Void extractResultAsync(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.
      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 a TimeoutException if 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 a TimeoutException if 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