Class ResponseHandlerHelper
- java.lang.Object
-
- software.amazon.awssdk.http.crt.internal.response.ResponseHandlerHelper
-
public class ResponseHandlerHelper extends Object
This is the helper class that contains common logic shared betweenCrtResponseAdapter
andInputStreamAdaptingHttpStreamResponseHandler
. CRT connection will only be closed, i.e., not reused, in one of the following conditions: 1. 5xx server error OR 2. It fails to read the response OR 3. the response stream is closed/aborted by the caller.
-
-
Constructor Summary
Constructors Constructor Description ResponseHandlerHelper(SdkHttpResponse.Builder responseBuilder, software.amazon.awssdk.crt.http.HttpClientConnection connection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanUpConnectionBasedOnStatusCode(software.amazon.awssdk.crt.http.HttpStream stream)
void
closeConnection(software.amazon.awssdk.crt.http.HttpStream stream)
Close the connection completelyvoid
incrementWindow(software.amazon.awssdk.crt.http.HttpStream stream, int windowSize)
void
onResponseHeaders(software.amazon.awssdk.crt.http.HttpStream stream, int responseStatusCode, int headerType, software.amazon.awssdk.crt.http.HttpHeader[] nextHeaders)
void
releaseConnection(software.amazon.awssdk.crt.http.HttpStream stream)
Release the connection back to the pool so that it can be reused.
-
-
-
Constructor Detail
-
ResponseHandlerHelper
public ResponseHandlerHelper(SdkHttpResponse.Builder responseBuilder, software.amazon.awssdk.crt.http.HttpClientConnection connection)
-
-
Method Detail
-
onResponseHeaders
public void onResponseHeaders(software.amazon.awssdk.crt.http.HttpStream stream, int responseStatusCode, int headerType, software.amazon.awssdk.crt.http.HttpHeader[] nextHeaders)
-
releaseConnection
public void releaseConnection(software.amazon.awssdk.crt.http.HttpStream stream)
Release the connection back to the pool so that it can be reused.
-
incrementWindow
public void incrementWindow(software.amazon.awssdk.crt.http.HttpStream stream, int windowSize)
-
closeConnection
public void closeConnection(software.amazon.awssdk.crt.http.HttpStream stream)
Close the connection completely
-
cleanUpConnectionBasedOnStatusCode
public void cleanUpConnectionBasedOnStatusCode(software.amazon.awssdk.crt.http.HttpStream stream)
-
-