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.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCancel and close the stream, forcing the underlying connection to shut down rather than be returned to the connection pool.voidincrementWindow(int windowSize) voidonResponseHeaders(software.amazon.awssdk.crt.http.HttpStreamBase stream, int responseStatusCode, int headerType, software.amazon.awssdk.crt.http.HttpHeader[] nextHeaders) voidRelease the connection back to the pool so that it may be reused.
-
Constructor Details
-
ResponseHandlerHelper
-
-
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 beforeclose()per the CRT contract.
-