Class AbstractTransportListenerEx<E extends ProtocolEndpoint>

java.lang.Object
org.apache.axis2.transport.base.AbstractTransportListener
org.apache.axis2.transport.base.AbstractTransportListenerEx<E>
Type Parameters:
E - the type of protocol endpoint for this transport
All Implemented Interfaces:
org.apache.axis2.kernel.TransportListener
Direct Known Subclasses:
AbstractDatagramTransportListener, AbstractPollingTransportListener

public abstract class AbstractTransportListenerEx<E extends ProtocolEndpoint> extends AbstractTransportListener
Partial implementation of AbstractTransportListener with a higher level of abstraction. It maintains the mapping between services and protocol specific endpoints.

Note: the intention is to eventually merge the code in this class into AbstractTransportListener

  • Constructor Details

    • AbstractTransportListenerEx

      public AbstractTransportListenerEx()
  • Method Details

    • init

      public final void init(org.apache.axis2.context.ConfigurationContext cfgCtx, org.apache.axis2.description.TransportInDescription transportIn) throws org.apache.axis2.AxisFault
      Description copied from class: AbstractTransportListener
      Initialize the generic transport. Sets up the transport and the thread pool to be used for message processing. Also creates an AxisObserver that gets notified of service life cycle events for the transport to act on
      Specified by:
      init in interface org.apache.axis2.kernel.TransportListener
      Overrides:
      init in class AbstractTransportListener
      Parameters:
      cfgCtx - the axis configuration context
      transportIn - the transport-in description
      Throws:
      org.apache.axis2.AxisFault - on error
    • doInit

      protected abstract void doInit() throws org.apache.axis2.AxisFault
      Initialize the transport. This method will be called after the initialization work in AbstractTransportListener and before the first endpoint is created, i.e. before the first call to createEndpoint().
      Throws:
      org.apache.axis2.AxisFault
    • start

      public void start() throws org.apache.axis2.AxisFault
      Specified by:
      start in interface org.apache.axis2.kernel.TransportListener
      Overrides:
      start in class AbstractTransportListener
      Throws:
      org.apache.axis2.AxisFault
    • stop

      public void stop() throws org.apache.axis2.AxisFault
      Specified by:
      stop in interface org.apache.axis2.kernel.TransportListener
      Overrides:
      stop in class AbstractTransportListener
      Throws:
      org.apache.axis2.AxisFault
    • getEPRsForService

      public org.apache.axis2.addressing.EndpointReference[] getEPRsForService(String serviceName, String ip) throws org.apache.axis2.AxisFault
      Specified by:
      getEPRsForService in interface org.apache.axis2.kernel.TransportListener
      Overrides:
      getEPRsForService in class AbstractTransportListener
      Throws:
      org.apache.axis2.AxisFault
    • getEndpoints

      public final Collection<E> getEndpoints()
      Get the collection of all protocol endpoints managed by this transport, including the endpoint configured at the transport level.
      Returns:
      the collection of all protocol endpoints
    • createEndpoint

      protected abstract E createEndpoint()
    • startListeningForService

      protected final void startListeningForService(org.apache.axis2.description.AxisService service) throws org.apache.axis2.AxisFault
      Specified by:
      startListeningForService in class AbstractTransportListener
      Throws:
      org.apache.axis2.AxisFault
    • startEndpoint

      protected abstract void startEndpoint(E endpoint) throws org.apache.axis2.AxisFault
      Throws:
      org.apache.axis2.AxisFault
    • stopListeningForService

      protected final void stopListeningForService(org.apache.axis2.description.AxisService service)
      Specified by:
      stopListeningForService in class AbstractTransportListener
    • stopEndpoint

      protected abstract void stopEndpoint(E endpoint)