Package org.apache.http.nio.client.util
Class HttpAsyncClientUtils
java.lang.Object
org.apache.http.nio.client.util.HttpAsyncClientUtils
Static helpers for dealing with
HttpAsyncClient
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
closeQuietly
(CloseableHttpAsyncClient httpAsyncClient) Unconditionally close a httpAsyncClient.
-
Constructor Details
-
HttpAsyncClientUtils
private HttpAsyncClientUtils()
-
-
Method Details
-
closeQuietly
Unconditionally close a httpAsyncClient. Shuts down the underlying connection manager and releases the resources.Example Code:
HttpAsyncClient httpAsyncClient = null; try { httpAsyncClient = ...; } catch (Exception e) { // error handling } finally { HttpAsyncClientUtils.closeQuietly(httpAsyncClient); }
- Parameters:
httpAsyncClient
- the HttpAsyncClient to close, may be null or already closed.
-