public class PollingConsumer extends AbstractPollingEndpoint implements IntegrationConsumer
MessageHandler implementation
to a PollableChannel.lifecycleCondition, lifecycleLockEXPRESSION_PARSER, loggerDEFAULT_PHASE| Constructor and Description |
|---|
PollingConsumer(PollableChannel inputChannel,
MessageHandler handler) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStart()
Subclasses must implement this method with the start behavior.
|
protected void |
doStop()
Subclasses must implement this method with the stop behavior.
|
MessageHandler |
getHandler()
Return the consumer's handler.
|
MessageChannel |
getInputChannel()
Return the input channel.
|
MessageChannel |
getOutputChannel()
Return the output channel (may be null).
|
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 void |
handleMessage(Message<?> message)
Handle a message.
|
protected boolean |
isReactive() |
protected Message<?> |
receiveMessage()
Obtain the next message (if one is available).
|
void |
setReceiveTimeout(long receiveTimeout) |
applyReceiveOnlyAdviceChain, getBeanClassLoader, getDefaultErrorChannel, getPollingFlux, getTaskExecutor, isReceiveOnlyAdvice, isSyncExecutor, onInit, setAdviceChain, setBeanClassLoader, setErrorHandler, setMaxMessagesPerPoll, setTaskExecutor, setTransactionSynchronizationFactory, setTriggerdestroy, doStop, getPhase, getRole, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stopafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getComponentType, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBeanName, getComponentName, getComponentTypepublic PollingConsumer(PollableChannel inputChannel, MessageHandler handler)
public void setReceiveTimeout(long receiveTimeout)
public MessageChannel getInputChannel()
IntegrationConsumergetInputChannel in interface IntegrationConsumerpublic MessageChannel getOutputChannel()
IntegrationConsumergetOutputChannel in interface IntegrationConsumerpublic MessageHandler getHandler()
IntegrationConsumergetHandler in interface IntegrationConsumerprotected boolean isReactive()
isReactive in class AbstractPollingEndpointprotected void doStart()
AbstractEndpointAbstractEndpoint.lifecycleLock.doStart in class AbstractPollingEndpointprotected void doStop()
AbstractEndpointAbstractEndpoint.lifecycleLock.doStop in class AbstractPollingEndpointprotected void handleMessage(Message<?> message)
AbstractPollingEndpointhandleMessage in class AbstractPollingEndpointmessage - The message.protected Message<?> receiveMessage()
AbstractPollingEndpointreceiveMessage in class AbstractPollingEndpointprotected Object getResourceToBind()
AbstractPollingEndpointgetResourceToBind in class AbstractPollingEndpointprotected String getResourceKey()
AbstractPollingEndpointIntegrationResourceHolder. The default
ExpressionEvaluatingTransactionSynchronizationProcessor
makes this attribute available as a variable in SpEL expressions.getResourceKey in class AbstractPollingEndpoint