Example usage for org.apache.http.nio.reactor ListeningIOReactor shutdown

List of usage examples for org.apache.http.nio.reactor ListeningIOReactor shutdown

Introduction

In this page you can find the example usage for org.apache.http.nio.reactor ListeningIOReactor shutdown.

Prototype

void shutdown() throws IOException;

Source Link

Document

Initiates shutdown of the reactor and blocks for a default period of time waiting for the reactor to terminate all active connections, to shut down itself and to release system resources it currently holds.

Usage

From source file:org.apache.synapse.transport.passthru.core.PassThroughListeningIOReactorManager.java

/**
 * ShutdownIOReactor which is registered by HTTPListener running on given port
 *
 * @param port Port of  axis2 PTT Listener
 * @throws IOException Exception throwing when Shutdown
 *///from   ww  w  . j a  va 2 s  .c  om
public void shutdownIOReactor(int port) throws IOException {
    ListeningIOReactor ioReactor = shutdownReactor(port);
    if (ioReactor != null) {
        try {
            ioReactor.shutdown();
        } catch (IOException e) {
            throw new IOException(
                    "IOException occurred when shutting down IOReactor for Listener started on port " + port,
                    e);
        }
        passThroughListenerIOReactorMapper.remove(port);
        passThroughListenerServerIODispatchMapper.remove(port);

    }
}