public class SourcePollingChannelAdapter extends AbstractPollingEndpoint implements TrackableComponent
MessageSource
to a MessageChannel
.DEFAULT_POLLING_PERIOD
lifecycleCondition, lifecycleLock
EXPRESSION_PARSER, logger
DEFAULT_PHASE
Constructor and Description |
---|
SourcePollingChannelAdapter() |
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.
|
String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
MessageSource<?> |
getMessageSource()
Return this endpoint's source.
|
MessageChannel |
getOutputChannel() |
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 void |
handleMessage(Message<?> messageArg)
Handle a message.
|
protected boolean |
isReactive() |
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
protected Message<?> |
receiveMessage()
Obtain the next message (if one is available).
|
void |
setOutputChannel(MessageChannel outputChannel)
Specify the
MessageChannel where Messages should be sent. |
void |
setOutputChannelName(String outputChannelName) |
protected void |
setReceiveMessageSource(Object source) |
void |
setSendTimeout(long sendTimeout)
Specify the maximum time to wait for a Message to be sent to the
output channel.
|
void |
setShouldTrack(boolean shouldTrack)
Specify whether this component should be tracked in the Message History.
|
void |
setSource(MessageSource<?> source)
Specify the source to be polled for Messages.
|
applyReceiveOnlyAdviceChain, getBeanClassLoader, getDefaultErrorChannel, getPollingFlux, getTaskExecutor, isReceiveOnlyAdvice, isSyncExecutor, setAdviceChain, setBeanClassLoader, setErrorHandler, setMaxMessagesPerPoll, setTaskExecutor, setTransactionSynchronizationFactory, setTrigger
destroy, doStop, getPhase, getRole, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stop
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBeanName, getComponentName
public void setSource(MessageSource<?> source)
source
- The message source.public void setOutputChannel(MessageChannel outputChannel)
MessageChannel
where Messages should be sent.outputChannel
- The output channel.public MessageSource<?> getMessageSource()
public void setOutputChannelName(String outputChannelName)
public void setSendTimeout(long sendTimeout)
sendTimeout
- The send timeout.public void setShouldTrack(boolean shouldTrack)
setShouldTrack
in interface TrackableComponent
shouldTrack
- true if the component should be tracked.public String getComponentType()
IntegrationObjectSupport
getComponentType
in interface NamedComponent
getComponentType
in class IntegrationObjectSupport
protected boolean isReactive()
isReactive
in class AbstractPollingEndpoint
protected Object getReceiveMessageSource()
getReceiveMessageSource
in class AbstractPollingEndpoint
protected final void setReceiveMessageSource(Object source)
setReceiveMessageSource
in class AbstractPollingEndpoint
protected void doStart()
AbstractEndpoint
AbstractEndpoint.lifecycleLock
.doStart
in class AbstractPollingEndpoint
protected void doStop()
AbstractEndpoint
AbstractEndpoint.lifecycleLock
.doStop
in class AbstractPollingEndpoint
protected void onInit()
IntegrationObjectSupport
onInit
in class AbstractPollingEndpoint
public MessageChannel getOutputChannel()
protected void handleMessage(Message<?> messageArg)
AbstractPollingEndpoint
handleMessage
in class AbstractPollingEndpoint
messageArg
- The message.protected Message<?> receiveMessage()
AbstractPollingEndpoint
receiveMessage
in class AbstractPollingEndpoint
protected Object getResourceToBind()
AbstractPollingEndpoint
getResourceToBind
in class AbstractPollingEndpoint
protected String getResourceKey()
AbstractPollingEndpoint
IntegrationResourceHolder
. The default
ExpressionEvaluatingTransactionSynchronizationProcessor
makes this attribute available as a variable in SpEL expressions.getResourceKey
in class AbstractPollingEndpoint