use of org.apache.http.nio.reactor.ListeningIOReactor in project wso2-synapse by wso2.
the class PassThroughListeningIOReactorManager method pauseIOReactor.
/**
* Pause IO Reactor which is registered by HTTPListener running on given port
*
* @param port Port of axis2 PTT Listener
* @throws IOException Exception throwing when pausing
*/
public void pauseIOReactor(int port) throws IOException {
ListeningIOReactor listeningIOReactor = passThroughListenerIOReactorMapper.get(port);
ServerIODispatch serverIODispatch = passThroughListenerServerIODispatchMapper.get(port);
if (listeningIOReactor != null) {
if (serverIODispatch instanceof MultiListenerServerIODispatch || serverIODispatch instanceof MultiListenerSSLServerIODispatch) {
log.info("Pausing shared IO Reactor bind for port " + port + " will be caused for pausing non " + "axis2 Listeners ");
} else {
log.info("Pausing IO Reactor bind for port " + port);
}
listeningIOReactor.pause();
} else {
log.error("Cannot find Pass Through Listener for port " + port);
}
}
Aggregations