if (bootstrap != null) { bootstrap.releaseExternalResources();
if (bootstrap != null) { bootstrap.releaseExternalResources();
/** * Closes the Netty Channel and releases all resources */ @Override protected void stopInner() { /* * TODO REST-Server Need to handle inflight operations. What happens to * the existing async operations when a channel.close() is issued in * Netty? */ if(this.nettyServerChannel != null) { this.nettyServerChannel.close(); } if(allChannels != null) { allChannels.close().awaitUninterruptibly(); } this.bootstrap.releaseExternalResources(); }
@Override public void shutdown() { LOG.info("shutdown called " + localAddress); if (login != null) { login.shutdown(); } // null if factory never started if (parentChannel != null) { parentChannel.close().awaitUninterruptibly(); closeAll(); allChannels.close().awaitUninterruptibly(); bootstrap.releaseExternalResources(); } if (zkServer != null) { zkServer.shutdown(); } synchronized(this) { killed = true; notifyAll(); } }
public void stop() { super.stop(); if (this.serverChannel != null) { this.serverChannel.close().awaitUninterruptibly(1000); } // close sockets explicitly to reduce socket channel hung in complicated // network environment. if (this.childGroups != null) { this.childGroups.close().awaitUninterruptibly(5000); } if (this.bootstrap != null) { this.bootstrap.releaseExternalResources(); } if (embeddedServer.isStart()) { embeddedServer.stop(); } }
protected void stop() throws Exception { accepted.close().awaitUninterruptibly(10, TimeUnit.SECONDS); if (selector != null) { ServerBootstrap bootstrap = new ServerBootstrap(selector); bootstrap.releaseExternalResources(); } if (pipelineFact != null) { pipelineFact.destroy(); } if (timer != null) { // Release this shared timer resource timer.stop(); } if (dirWatcher != null) { dirWatcher.stop(); } }
@Override public void stop() { runtimePort = -1; allChannels.close().awaitUninterruptibly(); if (bootstrap != null) { bootstrap.releaseExternalResources(); } deployment.stop(); } }
@Override public WebServer call() throws Exception { if (channel != null) { channel.close(); } if (connectionTrackingHandler != null) { connectionTrackingHandler.closeAllConnections(); connectionTrackingHandler = null; } if (bootstrap != null) { bootstrap.releaseExternalResources(); } // shut down all services & give them a chance to terminate for (ExecutorService executorService : executorServices) { shutdownAndAwaitTermination(executorService); } bootstrap = null; if (channel != null) { channel.getCloseFuture().await(); } return NettyWebServer.this; } });
@Override public void releaseExternalResources() { bootstrap.releaseExternalResources(); }
public void shutdown() { if (this.serverChannel != null) { this.serverChannel.close().awaitUninterruptibly(1000); } if (this.bootstrap != null) { this.bootstrap.releaseExternalResources(); } logger.info(" ##Netty Server is shutdown."); }
public void stop() { logger.info("Closing all server session channels..."); this.sessionChannels.close().awaitUninterruptibly(); logger.info("Closing server channel..."); this.serverChannel.close().awaitUninterruptibly(); logger.info("Releasing server external resources..."); // NOTE: all this does is "terminate()" the executors this.serverBootstrap.releaseExternalResources(); logger.info("Simulator server stopped"); }
public void stop() { logger.info("Closing all server session channels..."); this.sessionChannels.close().awaitUninterruptibly(); logger.info("Closing server channel..."); this.serverChannel.close().awaitUninterruptibly(); logger.info("Releasing server external resources..."); // NOTE: all this does is "terminate()" the executors this.serverBootstrap.releaseExternalResources(); logger.info("Simulator server stopped"); }
@Override public void destroy() { this.bindTimer.cancel(); stop(); this.serverBootstrap.releaseExternalResources(); this.serverBootstrap = null; this.writeTimeoutTimer.stop(); unregisterMBean(); logger.info("{} destroyed on SMPP port [{}]", configuration.getName(), configuration.getPort()); }
public static final void release() { if (allChannels.size() > 0) allChannels.close().awaitUninterruptibly(); bootstrap.releaseExternalResources(); }
@After public void clean() throws IOException { if (fileSys != null) fileSys.delete(new Path(tokenFile), true); if (bootstrap != null) bootstrap.releaseExternalResources(); }
@Override public void destroy() { this.bindTimer.cancel(); stop(); this.serverBootstrap.releaseExternalResources(); this.serverBootstrap = null; this.writeTimeoutTimer.stop(); unregisterMBean(); logger.info("{} destroyed on SMPP port [{}]", configuration.getName(), configuration.getPort()); }
void shutdown() { allChannels.close().awaitUninterruptibly(); tcpServer.releaseExternalResources(); udpServer.releaseExternalResources(); }
@Override public void destroy() { this.bindTimer.cancel(); stop(); this.serverBootstrap.releaseExternalResources(); this.serverBootstrap = null; this.writeTimeoutTimer.stop(); unregisterMBean(); logger.info("{} destroyed on SMPP port [{}]", configuration.getName(), configuration.getPort()); }
public synchronized void stop() { accepted.close().awaitUninterruptibly(10, TimeUnit.SECONDS); ServerBootstrap bootstrap = new ServerBootstrap(channelFactory); bootstrap.releaseExternalResources(); }
private void stopServer() { allChannels.close().awaitUninterruptibly(); allChannels.clear(); if (serverBootstrap != null) { serverBootstrap.releaseExternalResources(); } if (clearRoutes) { clearRoutes(); } }