Class PassThroughHttpListener
java.lang.Object
org.apache.synapse.transport.passthru.PassThroughHttpListener
- All Implemented Interfaces:
org.apache.axis2.transport.TransportListener
- Direct Known Subclasses:
PassThroughHttpMultiSSLListener,PassThroughHttpSSLListener
public class PassThroughHttpListener
extends Object
implements org.apache.axis2.transport.TransportListener
This is the TransportListener listening for incoming connections. This class start the IOReactor
and registers the InRequest Handlers on it.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longDelay for ActiveConnectionMonitorprotected org.apache.commons.logging.LogFields inherited from interface org.apache.axis2.transport.TransportListener
HOST_ADDRESS, PARAM_PORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()org.apache.axis2.addressing.EndpointReferencegetEPRForService(String serviceName, String ip) org.apache.axis2.addressing.EndpointReference[]getEPRsForService(String serviceName, String ip) Return the EPRs for the given service over this transportorg.apache.axis2.context.SessionContextgetSessionContext(org.apache.axis2.context.MessageContext messageContext) voidinit(org.apache.axis2.context.ConfigurationContext cfgCtx, org.apache.axis2.description.TransportInDescription transportInDescription) protected ServerConnFactoryBuilderinitConnFactoryBuilder(org.apache.axis2.description.TransportInDescription transportIn, org.apache.http.HttpHost host, org.apache.axis2.context.ConfigurationContext configurationContext) protected SchemevoidmaintenanceShutdown(long milliSecs) Stop accepting new connections, and wait the maximum specified time for in-flight requests to complete before a controlled shutdown for maintenancevoidpause()Pause the listener - Stops accepting new connections, but continues processing existing connections until they complete.voidreload(org.apache.axis2.description.TransportInDescription transportIn) voidreloadDynamicSSLConfig(org.apache.axis2.description.TransportInDescription transportInDescription) Reload SSL configurations from configurations and reset all connectionsvoidreloadSpecificEndPoints(org.apache.axis2.description.TransportInDescription transportIn) Re-load specific end points given in Transport In Descriptionvoidresume()Resume the lister - Brings the lister into active mode back from a paused statevoidstart()voidstop()
-
Field Details
-
log
protected org.apache.commons.logging.Log log -
ACTIVE_CONNECTION_MONITOR_DELAY
public static final long ACTIVE_CONNECTION_MONITOR_DELAYDelay for ActiveConnectionMonitor- See Also:
-
-
Constructor Details
-
PassThroughHttpListener
public PassThroughHttpListener()
-
-
Method Details
-
initScheme
-
initConnFactoryBuilder
protected ServerConnFactoryBuilder initConnFactoryBuilder(org.apache.axis2.description.TransportInDescription transportIn, org.apache.http.HttpHost host, org.apache.axis2.context.ConfigurationContext configurationContext) throws org.apache.axis2.AxisFault - Throws:
org.apache.axis2.AxisFault
-
init
public void init(org.apache.axis2.context.ConfigurationContext cfgCtx, org.apache.axis2.description.TransportInDescription transportInDescription) throws org.apache.axis2.AxisFault - Specified by:
initin interfaceorg.apache.axis2.transport.TransportListener- Throws:
org.apache.axis2.AxisFault
-
start
public void start() throws org.apache.axis2.AxisFault- Specified by:
startin interfaceorg.apache.axis2.transport.TransportListener- Throws:
org.apache.axis2.AxisFault
-
getEPRForService
public org.apache.axis2.addressing.EndpointReference getEPRForService(String serviceName, String ip) throws org.apache.axis2.AxisFault - Specified by:
getEPRForServicein interfaceorg.apache.axis2.transport.TransportListener- Throws:
org.apache.axis2.AxisFault
-
getEPRsForService
public org.apache.axis2.addressing.EndpointReference[] getEPRsForService(String serviceName, String ip) throws org.apache.axis2.AxisFault Return the EPRs for the given service over this transport- Specified by:
getEPRsForServicein interfaceorg.apache.axis2.transport.TransportListener- Parameters:
serviceName- name of the serviceip- IP address- Returns:
- the EndpointReferences for this service over the transport
- Throws:
org.apache.axis2.AxisFault- on error
-
getSessionContext
public org.apache.axis2.context.SessionContext getSessionContext(org.apache.axis2.context.MessageContext messageContext) - Specified by:
getSessionContextin interfaceorg.apache.axis2.transport.TransportListener
-
stop
public void stop() throws org.apache.axis2.AxisFault- Specified by:
stopin interfaceorg.apache.axis2.transport.TransportListener- Throws:
org.apache.axis2.AxisFault
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.apache.axis2.transport.TransportListener
-
pause
public void pause() throws org.apache.axis2.AxisFaultPause the listener - Stops accepting new connections, but continues processing existing connections until they complete. This helps bring an instance into a maintenance mode- Throws:
org.apache.axis2.AxisFault- if pausing fails
-
resume
public void resume() throws org.apache.axis2.AxisFaultResume the lister - Brings the lister into active mode back from a paused state- Throws:
org.apache.axis2.AxisFault- if the resume fails
-
reload
public void reload(org.apache.axis2.description.TransportInDescription transportIn) throws org.apache.axis2.AxisFault - Throws:
org.apache.axis2.AxisFault
-
reloadSpecificEndPoints
public void reloadSpecificEndPoints(org.apache.axis2.description.TransportInDescription transportIn) throws org.apache.axis2.AxisFault Re-load specific end points given in Transport In Description- Parameters:
transportIn- TransportInDescriptions of the new configuration- Throws:
org.apache.axis2.AxisFault
-
maintenanceShutdown
public void maintenanceShutdown(long milliSecs) throws org.apache.axis2.AxisFault Stop accepting new connections, and wait the maximum specified time for in-flight requests to complete before a controlled shutdown for maintenance- Parameters:
milliSecs- number of milliseconds to wait until pending requests complete- Throws:
org.apache.axis2.AxisFault- if the shutdown fails
-
getTransportName
-
reloadDynamicSSLConfig
public void reloadDynamicSSLConfig(org.apache.axis2.description.TransportInDescription transportInDescription) throws org.apache.axis2.AxisFault Reload SSL configurations from configurations and reset all connections- Parameters:
transportInDescription- TransportInDescription of the configuration- Throws:
org.apache.axis2.AxisFault
-