org.jboss.soa.esb.listeners.old
Class AbstractPoller
java.lang.Object
org.jboss.soa.esb.listeners.old.AbstractListener
org.jboss.soa.esb.listeners.old.AbstractPoller
- All Implemented Interfaces:
- java.lang.Runnable
- Direct Known Subclasses:
- DirectoryPoller, RemoteDirectoryPoller, SqlTablePoller
public abstract class AbstractPoller
- extends AbstractListener
Abstract Polling Listener.
Polling listeners are listener implementations that periodically poll for message objects
that require processing. This type of listener implementation is required where the underlying
message channel doesn't support a blocking receive operation.
- Author:
- Esteban
| Fields inherited from class org.jboss.soa.esb.listeners.old.AbstractListener |
listenerConfig, logger, m_iMaxThr, m_iQthr, m_iSleepForThreads, m_iUpperThreadLimit, m_oActionDefinitionFactory, m_oActions, m_oDad, m_oMsgFactory, m_oThrGrp, MESSAGE_PROCESSING_ACTIONS_LIST |
|
Method Summary |
protected abstract java.util.List<java.lang.Object> |
pollForCandidates()
Poll for message objects. |
protected abstract java.lang.Object |
preProcess(java.lang.Object message)
Preprocess the message object before returning for pipeline processing. |
protected java.lang.Object[] |
receive()
Polling listener receive implementation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_iMinPollMillis
protected int m_iMinPollMillis
m_iDfltPollMillis
protected int m_iDfltPollMillis
PARM_POLL_LTCY
public static final java.lang.String PARM_POLL_LTCY
- See Also:
- Constant Field Values
m_iPollMillis
protected int m_iPollMillis
AbstractPoller
protected AbstractPoller(GpListener commandListener,
ConfigTree listenerConfig,
ActionDefinitionFactory actionDefinitionFactory)
throws java.lang.Exception
- Construct an abstract polling listener.
- Parameters:
commandListener - The command listener.listenerConfig - The configuration for this polling listener.actionDefinitionFactory - The action definition factory for the bus.
- Throws:
java.lang.Exception
receive
protected java.lang.Object[] receive()
- Polling listener receive implementation.
- Specified by:
receive in class AbstractListener
- Returns:
- An array of objects polled from the concrete Poller implementation.
pollForCandidates
protected abstract java.util.List<java.lang.Object> pollForCandidates()
- Poll for message objects.
- Returns:
- A list of message objects, or an empty list if there are no message objects.
preProcess
protected abstract java.lang.Object preProcess(java.lang.Object message)
- Preprocess the message object before returning for pipeline processing.
- Parameters:
message - Message object for preprocessing.
- Returns:
- The preprocessed message object, or the supplied message unmodified.