com.holonplatform.async.http.internal

## Interface AsyncInvoker

- All Known Implementing Classes:
    AbstractAsyncRestClient

      public interface AsyncInvoker

  Invoker to asynchronously perform a client request in order to consume a response using a `AsyncRestClient.AsyncRequestDefinition`.
  Since:
    5.2.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T,R> CompletionStage<ResponseEntity<T>>` | `invoke(AsyncRestClient.AsyncRequestDefinition requestDefinition, HttpMethod method, RequestEntity<R> requestEntity, ResponseType<T> responseType, boolean onlySuccessfulStatusCode)` Invoke a request asynchronously using current given `request` definition.

- - ### Method Detail

    - #### invoke

          <T,R> CompletionStage<ResponseEntity<T>> invoke(AsyncRestClient.AsyncRequestDefinition requestDefinition,
                                                          HttpMethod method,
                                                          RequestEntity<R> requestEntity,
                                                          ResponseType<T> responseType,
                                                          boolean onlySuccessfulStatusCode)

      Invoke a request asynchronously using current given `request` definition.
      Type Parameters:
        `T` - Response type
        `R` - Request entity type
      Parameters:
        `requestDefinition` - Request definition
        `method` - Request method
        `requestEntity` - Request message payload
        `responseType` - Expected response payload type
        `onlySuccessfulStatusCode` - `true` to return only `2xx` status code response and throw an `UnsuccessfulResponseException` otherwise, `false` to return any status code responses
      Returns:
        A `CompletionStage` to handle the `ResponseEntity` object as the result of the request invocation

Copyright © 2019 The Holon Platform. All rights reserved.