Interface SdkAsyncHttpResponseHandler

All Known Subinterfaces:
TransformingAsyncResponseHandler<ResultT>
All Known Implementing Classes:
AsyncAfterTransmissionInterceptorCallingResponseHandler, AsyncResponseHandler, AsyncStreamingResponseHandler, CombinedResponseAsyncHttpResponseHandler, FilterTransformingAsyncHttpResponseHandler, IdempotentAsyncResponseHandler

public interface SdkAsyncHttpResponseHandler
Handles asynchronous HTTP responses.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when there is an error making the request or receiving the response.
    void
    Called when the headers have been received.
    void
    onStream(org.reactivestreams.Publisher<ByteBuffer> stream)
    Called when the streaming body is ready.
  • Method Details

    • onHeaders

      void onHeaders(SdkHttpResponse headers)
      Called when the headers have been received.
      Parameters:
      headers - The headers.
    • onStream

      void onStream(org.reactivestreams.Publisher<ByteBuffer> stream)
      Called when the streaming body is ready.

      This method is always called. If the response does not have a body, then the publisher will complete the subscription without signalling any elements.

      Parameters:
      stream - The streaming body.
    • onError

      void onError(Throwable error)
      Called when there is an error making the request or receiving the response. If the error is encountered while streaming the body, then the error is also delivered to the Subscriber.
      Parameters:
      error - The error.