public class HttpAsyncClientUtils extends Object
HttpAsyncClient.| Modifier and Type | Method and Description |
|---|---|
static void |
closeQuietly(CloseableHttpAsyncClient httpAsyncClient)
Unconditionally close a httpAsyncClient.
|
public static void closeQuietly(CloseableHttpAsyncClient httpAsyncClient)
Example Code:
HttpAsyncClient httpAsyncClient = null;
try {
httpAsyncClient = ...;
} catch (Exception e) {
// error handling
} finally {
HttpAsyncClientUtils.closeQuietly(httpAsyncClient);
}
httpAsyncClient - the HttpAsyncClient to close, may be null or already closed.Copyright © 2010–2016 The Apache Software Foundation. All rights reserved.