org.springframework.integration.endpoint
Class AbstractPollingEndpoint
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.endpoint.AbstractPollingEndpoint
- All Implemented Interfaces:
- org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle
- Direct Known Subclasses:
- PollingConsumer, SourcePollingChannelAdapter
public abstract class AbstractPollingEndpoint
- extends AbstractEndpoint
- implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.BeanClassLoaderAware
- Author:
- Mark Fisher
Method Summary |
protected abstract boolean |
doPoll()
|
protected void |
doStart()
Subclasses must implement this method with the start behavior. |
protected void |
doStop()
Subclasses must implement this method with the stop behavior. |
protected void |
onInit()
|
void |
setAdviceChain(java.util.List<org.aopalliance.aop.Advice> adviceChain)
|
void |
setBeanClassLoader(java.lang.ClassLoader classLoader)
|
void |
setErrorHandler(ErrorHandler errorHandler)
|
void |
setMaxMessagesPerPoll(int maxMessagesPerPoll)
Set the maximum number of messages to receive for each poll. |
void |
setTaskExecutor(org.springframework.core.task.TaskExecutor taskExecutor)
|
void |
setTransactionDefinition(org.springframework.transaction.TransactionDefinition transactionDefinition)
|
void |
setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
Specify a transaction manager to use for all polling operations. |
void |
setTrigger(Trigger trigger)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.springframework.beans.factory.InitializingBean |
afterPropertiesSet |
MAX_MESSAGES_UNBOUNDED
public static final int MAX_MESSAGES_UNBOUNDED
- See Also:
- Constant Field Values
maxMessagesPerPoll
protected volatile long maxMessagesPerPoll
AbstractPollingEndpoint
public AbstractPollingEndpoint()
setTrigger
public void setTrigger(Trigger trigger)
setMaxMessagesPerPoll
public void setMaxMessagesPerPoll(int maxMessagesPerPoll)
- Set the maximum number of messages to receive for each poll.
A non-positive value indicates that polling should repeat as long
as non-null messages are being received and successfully sent.
The default is unbounded.
- See Also:
MAX_MESSAGES_UNBOUNDED
setTaskExecutor
public void setTaskExecutor(org.springframework.core.task.TaskExecutor taskExecutor)
setErrorHandler
public void setErrorHandler(ErrorHandler errorHandler)
setTransactionManager
public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
- Specify a transaction manager to use for all polling operations.
If none is provided, then the operations will occur without any
transactional behavior (i.e. there is no default transaction manager).
setTransactionDefinition
public void setTransactionDefinition(org.springframework.transaction.TransactionDefinition transactionDefinition)
setBeanClassLoader
public void setBeanClassLoader(java.lang.ClassLoader classLoader)
- Specified by:
setBeanClassLoader
in interface org.springframework.beans.factory.BeanClassLoaderAware
setAdviceChain
public void setAdviceChain(java.util.List<org.aopalliance.aop.Advice> adviceChain)
onInit
protected void onInit()
- Overrides:
onInit
in class AbstractEndpoint
doStart
protected void doStart()
- Description copied from class:
AbstractEndpoint
- Subclasses must implement this method with the start behavior.
This method will be invoked while holding the
AbstractEndpoint.lifecycleLock
.
- Specified by:
doStart
in class AbstractEndpoint
doStop
protected void doStop()
- Description copied from class:
AbstractEndpoint
- Subclasses must implement this method with the stop behavior.
This method will be invoked while holding the
AbstractEndpoint.lifecycleLock
.
- Specified by:
doStop
in class AbstractEndpoint
doPoll
protected abstract boolean doPoll()