Class CrtResponseAdapter

java.lang.Object
software.amazon.awssdk.http.crt.internal.response.CrtResponseAdapter
All Implemented Interfaces:
software.amazon.awssdk.crt.http.HttpStreamBaseResponseHandler

@SdkInternalApi public final class CrtResponseAdapter extends Object implements software.amazon.awssdk.crt.http.HttpStreamBaseResponseHandler
Response handler adaptor for AwsCrtAsyncHttpClient.

Implements the CrtHttpStreamHandler API and converts CRT callbacks into calls to SDK AsyncExecuteRequest methods

  • Constructor Details

  • Method Details

    • toCrtResponseHandler

      public static software.amazon.awssdk.crt.http.HttpStreamBaseResponseHandler toCrtResponseHandler(CompletableFuture<Void> requestFuture, SdkAsyncHttpResponseHandler responseHandler)
    • onResponseHeaders

      public void onResponseHeaders(software.amazon.awssdk.crt.http.HttpStreamBase stream, int responseStatusCode, int headerType, software.amazon.awssdk.crt.http.HttpHeader[] nextHeaders)
      Specified by:
      onResponseHeaders in interface software.amazon.awssdk.crt.http.HttpStreamBaseResponseHandler
    • onResponseHeadersDone

      public void onResponseHeadersDone(software.amazon.awssdk.crt.http.HttpStreamBase stream, int headerType)
      Specified by:
      onResponseHeadersDone in interface software.amazon.awssdk.crt.http.HttpStreamBaseResponseHandler
    • onResponseBody

      public int onResponseBody(software.amazon.awssdk.crt.http.HttpStreamBase stream, byte[] bodyBytesIn)
      Specified by:
      onResponseBody in interface software.amazon.awssdk.crt.http.HttpStreamBaseResponseHandler
    • onResponseComplete

      public void onResponseComplete(software.amazon.awssdk.crt.http.HttpStreamBase stream, int errorCode)
      Specified by:
      onResponseComplete in interface software.amazon.awssdk.crt.http.HttpStreamBaseResponseHandler