Package org.apache.axis2.transport.base
Class AbstractPollingTransportListener<T extends AbstractPollTableEntry>
java.lang.Object
org.apache.axis2.transport.base.AbstractTransportListener
org.apache.axis2.transport.base.AbstractTransportListenerEx<T>
org.apache.axis2.transport.base.AbstractPollingTransportListener<T>
- All Implemented Interfaces:
org.apache.axis2.kernel.TransportListener
public abstract class AbstractPollingTransportListener<T extends AbstractPollTableEntry>
extends AbstractTransportListenerEx<T>
-
Field Summary
Fields inherited from class org.apache.axis2.transport.base.AbstractTransportListener
cfgCtx, config, isNonBlocking, log, metrics, state, useAxis2ThreadPool, workerPoolFields inherited from interface org.apache.axis2.kernel.TransportListener
HOST_ADDRESS, PARAM_PORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()protected voiddoInit()Initialize the transport.voidmaintenenceShutdown(long millis) Stop processing new messages, and wait the specified maximum time for in-flight requests to complete before a controlled shutdown for maintenenceprotected voidonPollCompletion(T entry) voidpause()Pause the listener - Stop accepting/processing new messages, but continues processing existing messages until they complete.protected abstract voidprotected voidprocessFailure(String msg, Exception e, T entry) method to log a failure to the log file and to update the last poll status and timevoidresume()Resume the lister - Brings the lister into active mode back from a paused stateprotected voidstartEndpoint(T endpoint) protected voidstopEndpoint(T endpoint) Methods inherited from class org.apache.axis2.transport.base.AbstractTransportListenerEx
createEndpoint, getEndpoints, getEPRsForService, init, start, startListeningForService, stop, stopListeningForServiceMethods inherited from class org.apache.axis2.transport.base.AbstractTransportListener
createMessageContext, 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, resetStatistics
-
Constructor Details
-
AbstractPollingTransportListener
public AbstractPollingTransportListener()
-
-
Method Details
-
doInit
protected void doInit() throws org.apache.axis2.AxisFaultDescription copied from class:AbstractTransportListenerExInitialize the transport. This method will be called after the initialization work inAbstractTransportListenerand before the first endpoint is created, i.e. before the first call toAbstractTransportListenerEx.createEndpoint().- Specified by:
doInitin classAbstractTransportListenerEx<T extends AbstractPollTableEntry>- Throws:
org.apache.axis2.AxisFault
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.apache.axis2.kernel.TransportListener- Overrides:
destroyin classAbstractTransportListener
-
startEndpoint
- Specified by:
startEndpointin classAbstractTransportListenerEx<T extends AbstractPollTableEntry>- Throws:
org.apache.axis2.AxisFault
-
stopEndpoint
- Specified by:
stopEndpointin classAbstractTransportListenerEx<T extends AbstractPollTableEntry>
-
poll
-
onPollCompletion
-
processFailure
method to log a failure to the log file and to update the last poll status and time- Parameters:
msg- text for the log messagee- optional exception encountered or nullentry- the PollTableEntry
-
pause
public void pause() throws org.apache.axis2.AxisFaultPause the listener - Stop accepting/processing new messages, but continues processing existing messages until they complete. This helps bring an instance into a maintenence mode- Overrides:
pausein classAbstractTransportListener- Throws:
org.apache.axis2.AxisFault- on error
-
resume
public void resume() throws org.apache.axis2.AxisFaultResume the lister - Brings the lister into active mode back from a paused state- Overrides:
resumein classAbstractTransportListener- Throws:
org.apache.axis2.AxisFault- on error
-
maintenenceShutdown
public void maintenenceShutdown(long millis) throws org.apache.axis2.AxisFault Stop processing new messages, and wait the specified maximum time for in-flight requests to complete before a controlled shutdown for maintenence- Overrides:
maintenenceShutdownin classAbstractTransportListener- Parameters:
millis- a number of milliseconds to wait until pending requests are allowed to complete- Throws:
org.apache.axis2.AxisFault- on error
-