Class ApacheConnectionClosingStrategy.GracefulClosingStrategy
java.lang.Object
org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy.GracefulClosingStrategy
- All Implemented Interfaces:
ApacheConnectionClosingStrategy
- Enclosing interface:
- ApacheConnectionClosingStrategy
public static class ApacheConnectionClosingStrategy.GracefulClosingStrategy
extends Object
implements ApacheConnectionClosingStrategy
Strategy that aborts Apache HttpRequests for the case of Chunked Stream, closes the stream, and response next.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy
ApacheConnectionClosingStrategy.GracefulClosingStrategy, ApacheConnectionClosingStrategy.ImmediateClosingStrategy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose(ClientRequest clientRequest, org.apache.http.client.methods.HttpUriRequest request, org.apache.http.client.methods.CloseableHttpResponse response, InputStream stream) Method to close the connection.
-
Constructor Details
-
GracefulClosingStrategy
public GracefulClosingStrategy()
-
-
Method Details
-
close
public void close(ClientRequest clientRequest, org.apache.http.client.methods.HttpUriRequest request, org.apache.http.client.methods.CloseableHttpResponse response, InputStream stream) throws IOException Description copied from interface:ApacheConnectionClosingStrategyMethod to close the connection.- Specified by:
closein interfaceApacheConnectionClosingStrategy- Parameters:
clientRequest- TheClientRequestto getconfiguration, andresolve properties.request- ApacheHttpUriRequestthat can beaborted.response- ApacheCloseableHttpResponsethat can beclosed.stream- The entity stream that can beclosed.- Throws:
IOException- In case of some of the closing methods throwsIOException
-