/** * Close the underlying AsyncHttpClient for this instance. * <br> * 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() throws IOException { if (!derived && asyncHttpClient != null) { asyncHttpClient.close(); } }
@Override public void close() throws IOException { httpClient.close(); }
@Override public void close() throws IOException { asyncHttpClient.close(); } }
/** * Close the underlying http client. * * @throws IOException if the client could close without an IO error */ public final void close() throws IOException { asyncHttpClient.close(); } }
@Override protected void closeDelegate() throws Throwable { asyncHttpClient.close(); }
@Override public void close() throws IOException { httpTransport.close(); } }
@Override public void close() throws Exception { httpClient.close(); }
@Override protected void closeDelegate() throws Throwable { asyncHttpClient.close(); }
/** * Disposes and closes the managementClient. * @throws IOException */ public void close() throws IOException { this.asyncHttpClient.close(); }
@Override public void close() { try { httpClient.close(); } catch (IOException e) { throw new RuntimeException(e); } }
@Override public void close() { try { httpClient.close(); } catch (IOException e) { LOGGER.debug("Ignoring exception while closing StashClient: {}", e, e); } }
@Override public void close() { try { client.close(); } catch (IOException ioe) { log.error("Error while closing AsyncHTTPClient", ioe); } }
@Override public void close() { try { client.close(); } catch (IOException ioe) { log.error("Error while closing AsyncHTTPClient", ioe); } }
@Override public void destroy() { try { client.close(); } catch (IOException ex) { throw new HttpClientException(ex); } }
@Override protected void doStop() throws Exception { super.doStop(); if (client != null) { client.close(); } }
public void close() { if (closeClient && !client.isClosed()) { try { client.close(); } catch (IOException e) { logger.warn("Unexpected error on client close", e); } } closed = true; }
public void close() throws IOException { if (websocket != null) { websocket.close(); } if (client != null) { client.close(); } }
public void close() throws IOException { if (websocket != null) { websocket.close(); } if (client != null) { client.close(); } }
@Test public void testClosing() throws Exception { AsyncHttpClient mockClient = mock(AsyncHttpClient.class); pubscriber.setClient(mockClient); pubscriber.close(); verify(mockClient, times(1)).close(); }