|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.synapse.transport.base.AbstractTransportListener
org.apache.synapse.transport.base.AbstractPollingTransportListener
public abstract class AbstractPollingTransportListener
| Field Summary | |
|---|---|
static int |
DEFAULT_POLL_INTERVAL
the default poll interval |
protected boolean |
pollInProgress
is a poll already executing? |
protected int |
pollInterval
default interval in ms before polls |
protected Object |
pollLock
a lock to prevent concurrent execution of polling |
protected Map |
serviceToTimerTaskMap
a map that keeps track of services to the timer tasks created for them |
protected Timer |
timer
The main timer that runs as a daemon thread |
static String |
TRANSPORT_POLL_INTERVAL
the parameter in the services.xml that specifies the poll interval for a service |
| Fields inherited from class org.apache.synapse.transport.base.AbstractTransportListener |
|---|
cfgCtx, engine, isNonBlocking, log, metrics, state, transportName, useAxis2ThreadPool, workerPool |
| Fields inherited from interface org.apache.axis2.transport.TransportListener |
|---|
HOST_ADDRESS, PARAM_PORT |
| Constructor Summary | |
|---|---|
AbstractPollingTransportListener()
|
|
| Method Summary | |
|---|---|
void |
cancelPoll(AxisService service)
Cancel any pending timer tasks for the given service |
int |
getPollInterval()
|
void |
maintenenceShutdown(long millis)
Stop processing new messages, and wait the specified maximum time for in-flight requests to complete before a controlled shutdown for maintenence |
void |
onPoll()
|
void |
pause()
Pause the listener - Stop accepting/processing new messages, but continues processing existing messages until they complete. |
void |
resume()
Resume the lister - Brings the lister into active mode back from a paused state |
void |
schedulePoll(AxisService service,
long pollInterval)
Schedule a repeated poll at the specified interval for the given service |
void |
setPollInterval(int pollInterval)
|
protected void |
startListeningForService(AxisService service)
|
protected void |
stopListeningForService(AxisService service)
|
| Methods inherited from class org.apache.synapse.transport.base.AbstractTransportListener |
|---|
createMessageContext, destroy, disableTransportForService, getActiveThreadCount, getBytesReceived, getBytesSent, getEPRForService, getFaultsReceiving, getFaultsSending, getMessagesReceived, getMessagesSent, getMetricsCollector, getQueueSize, getSessionContext, getTransportName, handleException, handleIncomingMessage, init, logException, setTransportName, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.axis2.transport.TransportListener |
|---|
getEPRsForService |
| Field Detail |
|---|
public static final String TRANSPORT_POLL_INTERVAL
public static final int DEFAULT_POLL_INTERVAL
protected int pollInterval
protected final Timer timer
protected boolean pollInProgress
protected final Object pollLock
protected Map serviceToTimerTaskMap
| Constructor Detail |
|---|
public AbstractPollingTransportListener()
| Method Detail |
|---|
public void schedulePoll(AxisService service,
long pollInterval)
service - the service to be polledpollInterval - the interval between successive polls in secondspublic void cancelPoll(AxisService service)
service - the service for which the timer task should be cancelledpublic void onPoll()
protected void startListeningForService(AxisService service)
startListeningForService in class AbstractTransportListenerprotected void stopListeningForService(AxisService service)
stopListeningForService in class AbstractTransportListenerpublic int getPollInterval()
public void setPollInterval(int pollInterval)
public void pause()
throws AxisFault
pause in class AbstractTransportListenerAxisFault - on error
public void resume()
throws AxisFault
resume in class AbstractTransportListenerAxisFault - on error
public void maintenenceShutdown(long millis)
throws AxisFault
maintenenceShutdown in class AbstractTransportListenermillis - a number of milliseconds to wait until pending requests are allowed to complete
AxisFault - on error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||