org.apache.axis2.transport.base
Class AbstractTransportListenerEx<E extends ProtocolEndpoint>

java.lang.Object
  extended by org.apache.axis2.transport.base.AbstractTransportListener
      extended by org.apache.axis2.transport.base.AbstractTransportListenerEx<E>
Type Parameters:
E - the type of protocol endpoint for this transport
All Implemented Interfaces:
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


Field Summary
 
Fields inherited from class org.apache.axis2.transport.base.AbstractTransportListener
cfgCtx, config, isNonBlocking, log, metrics, state, useAxis2ThreadPool, workerPool
 
Fields inherited from interface org.apache.axis2.transport.TransportListener
HOST_ADDRESS, PARAM_PORT
 
Constructor Summary
AbstractTransportListenerEx()
           
 
Method Summary
protected abstract  E createEndpoint()
           
protected abstract  void doInit()
          Initialize the transport.
 java.util.Collection<E> getEndpoints()
          Get the collection of all protocol endpoints managed by this transport, including the endpoint configured at the transport level.
 EndpointReference[] getEPRsForService(java.lang.String serviceName, java.lang.String ip)
           
 void init(ConfigurationContext cfgCtx, TransportInDescription transportIn)
          Initialize the generic transport.
 void start()
           
protected abstract  void startEndpoint(E endpoint)
           
protected  void startListeningForService(AxisService service)
           
 void stop()
           
protected abstract  void stopEndpoint(E endpoint)
           
protected  void stopListeningForService(AxisService service)
           
 
Methods inherited from class org.apache.axis2.transport.base.AbstractTransportListener
createMessageContext, destroy, disableTransportForService, getActiveThreadCount, getAvgSizeReceived, getAvgSizeSent, getBytesReceived, getBytesSent, getConfigurationContext, getEPRForService, getEPRsForService, getFaultsReceiving, getFaultsSending, getLastResetTime, getMaxSizeReceived, getMaxSizeSent, getMessagesReceived, getMessagesSent, getMetricsCollector, getMetricsWindow, getMinSizeReceived, getMinSizeSent, getQueueSize, getResponseCodeTable, getSessionContext, getTimeoutsReceiving, getTimeoutsSending, getTransportInDescription, getTransportName, handleException, handleIncomingMessage, logException, maintenenceShutdown, pause, resetStatistics, resume
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTransportListenerEx

public AbstractTransportListenerEx()
Method Detail

init

public final void init(ConfigurationContext cfgCtx,
                       TransportInDescription transportIn)
                throws 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 TransportListener
Overrides:
init in class AbstractTransportListener
Parameters:
cfgCtx - the axis configuration context
transportIn - the transport-in description
Throws:
AxisFault - on error

doInit

protected abstract void doInit()
                        throws 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:
AxisFault

start

public void start()
           throws AxisFault
Specified by:
start in interface TransportListener
Overrides:
start in class AbstractTransportListener
Throws:
AxisFault

stop

public void stop()
          throws AxisFault
Specified by:
stop in interface TransportListener
Overrides:
stop in class AbstractTransportListener
Throws:
AxisFault

getEPRsForService

public EndpointReference[] getEPRsForService(java.lang.String serviceName,
                                             java.lang.String ip)
                                      throws AxisFault
Specified by:
getEPRsForService in interface TransportListener
Overrides:
getEPRsForService in class AbstractTransportListener
Throws:
AxisFault

getEndpoints

public final java.util.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(AxisService service)
                                       throws AxisFault
Specified by:
startListeningForService in class AbstractTransportListener
Throws:
AxisFault

startEndpoint

protected abstract void startEndpoint(E endpoint)
                               throws AxisFault
Throws:
AxisFault

stopListeningForService

protected final void stopListeningForService(AxisService service)
Specified by:
stopListeningForService in class AbstractTransportListener

stopEndpoint

protected abstract void stopEndpoint(E endpoint)


Copyright © 2004-2014 The Apache Software Foundation. All Rights Reserved.