@Override public void stop() { bootstrap.releaseExternalResources(); } }
public void run() { ChannelGroupFuture future = ALL_CHANNELS.close(); try { future.await(NettyTCPClient.this.maxShutdownWaitTime); } catch (InterruptedException e) { e.printStackTrace(); } bootstrap.releaseExternalResources(); } });
public void close() { channelPool.destroy(); openChannels.close(); for (Channel channel : openChannels) { Object attribute = Channels.getAttribute(channel); if (attribute instanceof NettyResponseFuture<?>) { NettyResponseFuture<?> future = (NettyResponseFuture<?>) attribute; future.cancelTimeouts(); } } // FIXME also shutdown in provider config.executorService().shutdown(); if (allowReleaseSocketChannelFactory) { socketChannelFactory.releaseExternalResources(); plainBootstrap.releaseExternalResources(); secureBootstrap.releaseExternalResources(); webSocketBootstrap.releaseExternalResources(); secureWebSocketBootstrap.releaseExternalResources(); } }
@Override public void stop() { bootstrap.releaseExternalResources(); } }
@Override public void stop() { bootstrap.releaseExternalResources(); } }
@Override public void stop() { bootstrap.releaseExternalResources(); } }
@Override public void stop() { bootstrap.releaseExternalResources(); } }
@Override public void stop() { bootstrap.releaseExternalResources(); } }
@Override public void destroy() throws Exception { if (null != channelGroup) { channelGroup.close(); } if (null != bootstrap) { bootstrap.releaseExternalResources(); } }
@Override public void releaseExternalResources() { log.debug("Closing all channels."); allChannels.close().awaitUninterruptibly(); log.debug("Releasing IO-Layer external resources."); super.releaseExternalResources(); }
@Override protected void doShutdown(long timeout, TimeUnit unit) throws InterruptedException { if (retryExecutorService != null) { retryExecutorService.shutdownNow(); retryExecutorService.awaitTermination(timeout, unit); } channelGroup.close().await(timeout, unit); bootstrap.releaseExternalResources(); }
@Override public void close() { channels.close().awaitUninterruptibly(); client.releaseExternalResources(); }
@Override public WebSocketClient call() throws Exception { try { channel.getCloseFuture().awaitUninterruptibly(); bootstrap.releaseExternalResources(); webSocketHandler.onClose(null); } catch (Throwable e) { exceptionHandler.uncaughtException(Thread.currentThread(), WebbitException.fromException(e, channel)); } return WebSocketClient.this; } });
public void shutdown() { long start = System.currentTimeMillis(); try { shutdown.set(true); future.getChannel().close(); future.getChannel().getCloseFuture().awaitUninterruptibly(); bootstrap.shutdown(); } finally { bootstrap.releaseExternalResources(); LOG.debug("RpcClient shutdown took " + (System.currentTimeMillis() - start) + " ms"); } }
public void disconnect() { channel.write(new DisconnectMessage()).awaitUninterruptibly(); channel.close().awaitUninterruptibly(); bootstrap.releaseExternalResources(); }
@Override public void destroy() { // close all channels still open within this session "bootstrap" this.channels.close().awaitUninterruptibly(); // clean up all external resources this.clientBootstrap.releaseExternalResources(); // stop the writeTimeout timer this.writeTimeoutTimer.stop(); }
@Override public void destroy() { // close all channels still open within this session "bootstrap" this.channels.close().awaitUninterruptibly(); // clean up all external resources this.clientBootstrap.releaseExternalResources(); // stop the writeTimeout timer this.writeTimeoutTimer.stop(); }
@Override public void destroy() { // close all channels still open within this session "bootstrap" this.channels.close().awaitUninterruptibly(); // clean up all external resources this.clientBootstrap.releaseExternalResources(); // stop the writeTimeout timer this.writeTimeoutTimer.stop(); }
@Override public void destroy() { // close all channels still open within this session "bootstrap" this.channels.close().awaitUninterruptibly(); // clean up all external resources this.clientBootstrap.releaseExternalResources(); // stop the writeTimeout timer this.writeTimeoutTimer.stop(); }
@Override public void stop() { if ( channelPool != null ) { channelPool.close( true ); bootstrap.releaseExternalResources(); channelPool = null; } comExceptionHandler = getNoOpComExceptionHandler(); msgLog.info( toString() + " shutdown" ); }