public abstract class AbstractPollingEndpoint extends AbstractEndpoint implements BeanClassLoaderAware
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_POLLING_PERIOD
A default polling period for
PeriodicTrigger. |
lifecycleCondition, lifecycleLockEXPRESSION_PARSER, loggerDEFAULT_PHASE| Constructor and Description |
|---|
AbstractPollingEndpoint() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyReceiveOnlyAdviceChain(Collection<Advice> chain)
Add the advice chain to the component that responds to
receiveMessage() calls. |
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 ClassLoader |
getBeanClassLoader() |
MessageChannel |
getDefaultErrorChannel()
Return the default error channel if the error handler is explicitly provided and
it is a
MessagePublishingErrorHandler. |
protected reactor.core.publisher.Flux<Message<?>> |
getPollingFlux() |
protected Object |
getReceiveMessageSource() |
protected String |
getResourceKey()
Return the key under which the resource will be made available as an
attribute on the
IntegrationResourceHolder. |
protected Object |
getResourceToBind()
Return a resource (MessageSource etc) to bind when using transaction
synchronization.
|
protected Executor |
getTaskExecutor() |
protected abstract void |
handleMessage(Message<?> message)
Handle a message.
|
protected boolean |
isReactive() |
protected boolean |
isReceiveOnlyAdvice(Advice advice)
Return true if this advice should be applied only to the
receiveMessage() operation
rather than the whole poll. |
protected boolean |
isSyncExecutor() |
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
protected abstract Message<?> |
receiveMessage()
Obtain the next message (if one is available).
|
void |
setAdviceChain(List<Advice> adviceChain) |
void |
setBeanClassLoader(ClassLoader classLoader) |
void |
setErrorHandler(ErrorHandler errorHandler) |
void |
setMaxMessagesPerPoll(long maxMessagesPerPoll) |
protected void |
setReceiveMessageSource(Object source) |
void |
setTaskExecutor(Executor taskExecutor) |
void |
setTransactionSynchronizationFactory(TransactionSynchronizationFactory transactionSynchronizationFactory) |
void |
setTrigger(Trigger trigger) |
destroy, doStop, getPhase, getRole, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stopafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getComponentType, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringpublic static final long DEFAULT_POLLING_PERIOD
PeriodicTrigger.public void setTaskExecutor(Executor taskExecutor)
protected Executor getTaskExecutor()
protected boolean isSyncExecutor()
public void setTrigger(Trigger trigger)
public void setMaxMessagesPerPoll(long maxMessagesPerPoll)
public void setErrorHandler(ErrorHandler errorHandler)
public void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader in interface BeanClassLoaderAwarepublic void setTransactionSynchronizationFactory(TransactionSynchronizationFactory transactionSynchronizationFactory)
public MessageChannel getDefaultErrorChannel()
MessagePublishingErrorHandler.protected ClassLoader getBeanClassLoader()
protected boolean isReceiveOnlyAdvice(Advice advice)
receiveMessage() operation
rather than the whole poll.advice - The advice.protected void applyReceiveOnlyAdviceChain(Collection<Advice> chain)
receiveMessage() calls.chain - the advice chain Collection.protected boolean isReactive()
protected reactor.core.publisher.Flux<Message<?>> getPollingFlux()
protected Object getReceiveMessageSource()
protected void setReceiveMessageSource(Object source)
protected void onInit()
IntegrationObjectSupportonInit in class AbstractEndpointprotected void doStart()
AbstractEndpointAbstractEndpoint.lifecycleLock.doStart in class AbstractEndpointprotected void doStop()
AbstractEndpointAbstractEndpoint.lifecycleLock.doStop in class AbstractEndpointprotected abstract Message<?> receiveMessage()
protected abstract void handleMessage(Message<?> message)
message - The message.protected Object getResourceToBind()
protected String getResourceKey()
IntegrationResourceHolder. The default
ExpressionEvaluatingTransactionSynchronizationProcessor
makes this attribute available as a variable in SpEL expressions.