Class ResponseHandlerHelper
java.lang.Object
software.amazon.awssdk.http.crt.internal.response.ResponseHandlerHelper
This is the helper class that contains common logic shared between
CrtResponseAdapter
and
InputStreamAdaptingHttpStreamResponseHandler
.
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
ConstructorsConstructorDescriptionResponseHandlerHelper
(SdkHttpResponse.Builder responseBuilder, software.amazon.awssdk.crt.http.HttpClientConnection connection) -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
(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 Details
-
ResponseHandlerHelper
public ResponseHandlerHelper(SdkHttpResponse.Builder responseBuilder, software.amazon.awssdk.crt.http.HttpClientConnection connection)
-
-
Method Details
-
onResponseHeaders
public void onResponseHeaders(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)
-