Class PassThroughListeningIOReactorManager
java.lang.Object
org.apache.synapse.transport.passthru.core.PassThroughListeningIOReactorManager
-
Method Summary
Modifier and TypeMethodDescriptionbooleancloseAllPTTListenerEndpoints(int port) Close all endpoints started by PTT Listeners.booleancloseDynamicPTTEndpoint(int port) Close external endpoints listen in shared IO ReactorbooleancloseSpecificPTTListenerEndpoints(int port, Set<InetSocketAddress> bindAddresses) Close specific endpoints started by PTT Listeners using give set of bind addresses.Provide manager object for internal servicesgetServerIODispatch(int port) Return ServerIODispatch registered under given portorg.apache.http.nio.reactor.ListeningIOReactorinitIOReactor(int port, org.apache.http.nio.NHttpServerEventHandler nHttpServerEventHandler, PassThroughSharedListenerConfiguration passThroughSharedListenerConfiguration) Create IOReactor with given configurationbooleanisDynamicEndpointRunning(int port) Check whether dynamic endpoint is running for a particular portvoidpauseIOReactor(int port) Pause IO Reactor which is registered by HTTPListener running on given portvoidresumeIOReactor(int port) Resume IO Reactor which is registered by HTTPListener running on given portvoidshutdownIOReactor(int port) ShutdownIOReactor which is registered by HTTPListener running on given portvoidshutdownIOReactor(int port, long miliSeconds) ShutdownIOReactor which is registered by HTTPListener running on given portvoidshutdownIOReactor(int port, SourceConfiguration sourceConfiguration, long timeout) ShutdownIOReactor which is registered by HTTPListener running on given portbooleanstartDynamicPTTEndpoint(InetSocketAddress inetSocketAddress, org.apache.http.nio.NHttpServerEventHandler nHttpServerEventHandler, String endpointName) Start Endpoint in IOReactor which is external to PTT Axis2 Listeners started at server startupbooleanstartDynamicPTTSSLEndpoint(InetSocketAddress inetSocketAddress, org.apache.http.nio.NHttpServerEventHandler nHttpServerEventHandler, String endpointName, SSLConfiguration sslConfiguration) Start SSL endpoint in IO reactor which is external to PTT Axis Listeners started at server startupvoidstartIOReactor(org.apache.http.nio.reactor.ListeningIOReactor listeningIOReactor, ServerIODispatch serverIODispatch, String prefix) StartIOReactor with given ServerIODispatchbooleanstartPTTEndpoint(InetSocketAddress inetSocketAddress, org.apache.http.impl.nio.reactor.DefaultListeningIOReactor defaultListeningIOReactor, String namePrefix) Start PTT Endpoint which is given by axis2.xml
-
Method Details
-
getInstance
Provide manager object for internal services- Returns:
- PassThroughIOReactorManager
-
startPTTEndpoint
public boolean startPTTEndpoint(InetSocketAddress inetSocketAddress, org.apache.http.impl.nio.reactor.DefaultListeningIOReactor defaultListeningIOReactor, String namePrefix) Start PTT Endpoint which is given by axis2.xml- Parameters:
inetSocketAddress- Socket Address of starting endpointdefaultListeningIOReactor- IO Reactor which starts EndpointnamePrefix- name specified for endpoint- Returns:
- Is started
-
startDynamicPTTEndpoint
public boolean startDynamicPTTEndpoint(InetSocketAddress inetSocketAddress, org.apache.http.nio.NHttpServerEventHandler nHttpServerEventHandler, String endpointName) Start Endpoint in IOReactor which is external to PTT Axis2 Listeners started at server startup- Parameters:
inetSocketAddress- Socket Address of starting endpointnHttpServerEventHandler- ServerHandler responsible for handle events of portendpointName- Endpoint Name- Returns:
- Is Endpoint started
-
startDynamicPTTSSLEndpoint
public boolean startDynamicPTTSSLEndpoint(InetSocketAddress inetSocketAddress, org.apache.http.nio.NHttpServerEventHandler nHttpServerEventHandler, String endpointName, SSLConfiguration sslConfiguration) Start SSL endpoint in IO reactor which is external to PTT Axis Listeners started at server startup- Parameters:
inetSocketAddress- InetSocketAddressnHttpServerEventHandler- ServerHandler responsible for handle events of portendpointName- Endpoint NamesslConfiguration- SSL information for create secure connection- Returns:
-
closeDynamicPTTEndpoint
public boolean closeDynamicPTTEndpoint(int port) Close external endpoints listen in shared IO Reactor- Parameters:
port- Port of the endpoint need to close- Returns:
- Is endpoint closed
-
closeAllPTTListenerEndpoints
public boolean closeAllPTTListenerEndpoints(int port) Close all endpoints started by PTT Listeners.- Parameters:
port- Port of the Endpoint for PTT axis2 Listener- Returns:
- is all Endpoints closed
-
closeSpecificPTTListenerEndpoints
Close specific endpoints started by PTT Listeners using give set of bind addresses.- Parameters:
port- Port of the listenerbindAddresses- bind address list of endpoints to be closed- Returns:
- true if successfully closed, false if any error
-
getServerIODispatch
Return ServerIODispatch registered under given port- Parameters:
port- Port of axis2 PTT Listener- Returns:
- ServerIODispatch
-
shutdownIOReactor
public void shutdownIOReactor(int port, SourceConfiguration sourceConfiguration, long timeout) throws IOException, InterruptedException ShutdownIOReactor which is registered by HTTPListener running on given port- Parameters:
port- Port of axis2 PTT ListenersourceConfiguration- Source Configuration from Source handlertimeout- Maximum timeout value for shutdown- Throws:
IOException- Exception throwing when ShutdownInterruptedException
-
shutdownIOReactor
ShutdownIOReactor which is registered by HTTPListener running on given port- Parameters:
port- Port of axis2 PTT Listener- Throws:
IOException- Exception throwing when Shutdown
-
shutdownIOReactor
ShutdownIOReactor which is registered by HTTPListener running on given port- Parameters:
port- Port of axis2 PTT ListenermiliSeconds- Waiting Time before close IO Reactor- Throws:
IOException- Exception throwing when Shutdown
-
pauseIOReactor
Pause IO Reactor which is registered by HTTPListener running on given port- Parameters:
port- Port of axis2 PTT Listener- Throws:
IOException- Exception throwing when pausing
-
resumeIOReactor
Resume IO Reactor which is registered by HTTPListener running on given port- Parameters:
port- Port of axis2 PTT Listener- Throws:
IOException- Exception throwing when pausing
-
startIOReactor
public void startIOReactor(org.apache.http.nio.reactor.ListeningIOReactor listeningIOReactor, ServerIODispatch serverIODispatch, String prefix) StartIOReactor with given ServerIODispatch- Parameters:
listeningIOReactor- Listening IO Reactor to be startserverIODispatch- underlying Event Dispatcher for Reactorprefix- HTTP/HTTPS
-
isDynamicEndpointRunning
public boolean isDynamicEndpointRunning(int port) Check whether dynamic endpoint is running for a particular port- Parameters:
port- port- Returns:
- whether dynamic endpoint is running for a particular port
-