Class ResponseHandlerHelper

java.lang.Object
software.amazon.awssdk.http.crt.internal.response.ResponseHandlerHelper

@SdkInternalApi public class ResponseHandlerHelper extends Object
This is the helper class that contains common logic shared between CrtResponseAdapter and InputStreamAdaptingHttpStreamResponseHandler.
  • Constructor Details

  • Method Details

    • onResponseHeaders

      public void onResponseHeaders(software.amazon.awssdk.crt.http.HttpStreamBase stream, int responseStatusCode, int headerType, software.amazon.awssdk.crt.http.HttpHeader[] nextHeaders)
    • incrementWindow

      public void incrementWindow(int windowSize)
    • releaseConnection

      public void releaseConnection()
      Release the connection back to the pool so that it may be reused. This should be called when the request completes successfully and the response has been fully consumed.
    • closeConnection

      public void closeConnection()
      Cancel and close the stream, forcing the underlying connection to shut down rather than be returned to the connection pool. This should be called on error paths or when the stream is aborted before the response is fully consumed. cancel() must be invoked before close() per the CRT contract.