/** * Deallocate APR memory pools, and close server socket. */ @Override public void unbind() throws Exception { if (running) { stop(); } // Destroy pool if it was initialised if (serverSockPool != 0) { Pool.destroy(serverSockPool); serverSockPool = 0; } doCloseServerSocket(); if (sslContext != 0) { Long ctx = Long.valueOf(sslContext); SSLContext.unregisterDefault(ctx); for (SSLHostConfig sslHostConfig : sslHostConfigs.values()) { sslHostConfig.setOpenSslContext(null); } sslContext = 0; } // Close all APR memory pools and resources if initialised if (rootPool != 0) { Pool.destroy(rootPool); rootPool = 0; } getHandler().recycle(); }
/** * Deallocate NIO memory pools, and close server socket. */ @Override public void unbind() throws Exception { if (log.isDebugEnabled()) { log.debug("Destroy initiated for "+new InetSocketAddress(getAddress(),getPort())); } if (running) { stop(); } doCloseServerSocket(); destroySsl(); super.unbind(); if (getHandler() != null ) { getHandler().recycle(); } selectorPool.close(); if (log.isDebugEnabled()) { log.debug("Destroy completed for "+new InetSocketAddress(getAddress(),getPort())); } }
/** * Deallocate NIO memory pools, and close server socket. */ @Override public void unbind() throws Exception { if (running) { stop(); } doCloseServerSocket(); destroySsl(); super.unbind(); // Unlike other connectors, the thread pool is tied to the server socket shutdownExecutor(); if (getHandler() != null) { getHandler().recycle(); } }