Package org.apache.synapse.transport.passthru

# 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

  Fields
  Modifier and Type
  Field
  Description
  `static final long`
  `ACTIVE_CONNECTION_MONITOR_DELAY`
  Delay for ActiveConnectionMonitor
  `protected org.apache.commons.logging.Log`
  `log`

  ### Fields inherited from interface org.apache.axis2.transport.TransportListener

  `HOST_ADDRESS, PARAM_PORT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PassThroughHttpListener()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `destroy()`
  `org.apache.axis2.addressing.EndpointReference`
  `getEPRForService(String serviceName, String ip)`
  `org.apache.axis2.addressing.EndpointReference[]`
  `getEPRsForService(String serviceName, String ip)`
  Return the EPRs for the given service over this transport
  `org.apache.axis2.context.SessionContext`
  `getSessionContext(org.apache.axis2.context.MessageContext messageContext)`
  `String`
  `getTransportName()`
  `void`
  `init(org.apache.axis2.context.ConfigurationContext cfgCtx, org.apache.axis2.description.TransportInDescription transportInDescription)`
  `protected ServerConnFactoryBuilder`
  `initConnFactoryBuilder(org.apache.axis2.description.TransportInDescription transportIn, org.apache.http.HttpHost host, org.apache.axis2.context.ConfigurationContext configurationContext)`
  `protected Scheme`
  `initScheme()`
  `void`
  `maintenanceShutdown(long milliSecs)`
  Stop accepting new connections, and wait the maximum specified time for in-flight requests to complete before a controlled shutdown for maintenance
  `void`
  `pause()`
  Pause the listener - Stops accepting new connections, but continues processing existing connections until they complete.
  `void`
  `reload(org.apache.axis2.description.TransportInDescription transportIn)`
  `void`
  `reloadDynamicSSLConfig(org.apache.axis2.description.TransportInDescription transportInDescription)`
  Reload SSL configurations from configurations and reset all connections
  `void`
  `reloadSpecificEndPoints(org.apache.axis2.description.TransportInDescription transportIn)`
  Re-load specific end points given in Transport In Description
  `void`
  `resume()`
  Resume the lister - Brings the lister into active mode back from a paused state
  `void`
  `start()`
  `void`
  `stop()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### log

    protected org.apache.commons.logging.Log log

  - ### ACTIVE_CONNECTION_MONITOR_DELAY

    public static final long ACTIVE_CONNECTION_MONITOR_DELAY
    Delay for ActiveConnectionMonitor
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### PassThroughHttpListener

    public PassThroughHttpListener()

- ## Method Details

  - ### initScheme

    protected Scheme 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:
      `init` in interface `org.apache.axis2.transport.TransportListener`
    Throws:
      `org.apache.axis2.AxisFault`

  - ### start

    public void start() throws org.apache.axis2.AxisFault
    Specified by:
      `start` in interface `org.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:
      `getEPRForService` in interface `org.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:
      `getEPRsForService` in interface `org.apache.axis2.transport.TransportListener`
    Parameters:
      `serviceName` - name of the service
      `ip` - 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:
      `getSessionContext` in interface `org.apache.axis2.transport.TransportListener`

  - ### stop

    public void stop() throws org.apache.axis2.AxisFault
    Specified by:
      `stop` in interface `org.apache.axis2.transport.TransportListener`
    Throws:
      `org.apache.axis2.AxisFault`

  - ### destroy

    public void destroy()
    Specified by:
      `destroy` in interface `org.apache.axis2.transport.TransportListener`

  - ### pause

    public void pause() throws org.apache.axis2.AxisFault
    Pause 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.AxisFault
    Resume 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

    public String 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`