@Override public void close() { grizzlyClient.close(); }
public static void close() { if (_client.get() != null) { _client.get().close(); } }
@After public void after() { client.close(); }
/** * Close the underlying AsyncHttpClient for this instance. * <p/> * If this instance is derived from another instance, this method does * nothing as the client instance is managed by the original * SimpleAsyncHttpClient. * * @see #derive() * @see AsyncHttpClient#close() */ public void close() { if (!derived && asyncHttpClient != null) { asyncHttpClient.close(); } }
/** * Shutdown each AHC client in the map. */ public void shutdown() { for (Entry<HttpClientType, AsyncHttpClient> entry : map.entrySet()) { AsyncHttpClient client = entry.getValue(); if (client != null) client.close(); } }
public void run() { try { close(); } catch (Throwable t) { logger.warn("", t); } finally { e.shutdown(); } } });
@After public void teardown() throws Exception { if (httpClient != null) { httpClient.close(); } }
@Override public void close() { asyncHttpClient.close(); } }
@Override public void close() { httpClient.close(); } }
@VisibleForTesting public void close() { httpAsyncClient.close(); httpAsyncClient = null; } /**
/** * Shutdown each AHC client in the map. */ public void shutdown() { for (Entry<HttpClientType, AsyncHttpClient> entry : map.entrySet()) { AsyncHttpClient client = entry.getValue(); if (client != null) client.close(); } }
@After public void tearDown() throws Exception { httpClient.close(); server.stop(); }
@Override public void close() { asyncHttpClient.close(); threadPool.shutdown(); }
@Override public void run() { options.runtime().close(); e.shutdown(); } });
@Override public void close() { asyncHttpClient.close(); threadPool.shutdown(); }
@PreDestroy public void destroy() { if (getClient() != null) getClient().close(); }
@Override public void stop() { asyncHttpClient.close(); workerScheduler.stop(); selectorScheduler.stop(); }
@Override public void destroy(){ try{ clientHandler.getHttpClient().close(); } finally { super.destroy(); } }
/** Closes HTTP connections and shuts down internal thread pools. * * <p>You should call this method right before your application exits, otherwise background threads created by the * SphereClient might prevent the process from terminating. */ public void shutdown() { Log.info("Shutting down SphereClient."); if (httpClient != null) httpClient.close(); if (clientCredentials instanceof SphereClientCredentials) ((SphereClientCredentials)clientCredentials).shutdown(); if (categoryTree instanceof CategoryTreeImpl) ((CategoryTreeImpl)categoryTree).shutdown(); }