public class SourcePollingChannelAdapter extends AbstractPollingEndpoint implements TrackableComponent
MessageSource to a MessageChannel.lifecycleCondition, lifecycleLockEXPRESSION_PARSER, logger| Constructor and Description |
|---|
SourcePollingChannelAdapter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyReceiveOnlyAdviceChain(Collection<Advice> chain)
Add the advice chain to the component that responds to
AbstractPollingEndpoint.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.
|
String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
MessageSource<?> |
getMessageSource()
Return this endpoint's source.
|
MessageChannel |
getOutputChannel() |
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 |
isReceiveOnlyAdvice(Advice advice)
Return true if this advice should be applied only to the
AbstractPollingEndpoint.receiveMessage() operation
rather than the whole poll. |
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) |
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.
|
getBeanClassLoader, getDefaultErrorChannel, setAdviceChain, setBeanClassLoader, setErrorHandler, setMaxMessagesPerPoll, setTaskExecutor, setTransactionSynchronizationFactory, setTriggerdoStop, getPhase, isAutoStartup, isRunning, setAutoStartup, setPhase, setTaskScheduler, start, stop, stopafterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetComponentNamepublic 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 TrackableComponentshouldTrack - true if the component should be tracked.public String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class IntegrationObjectSupportprotected boolean isReceiveOnlyAdvice(Advice advice)
AbstractPollingEndpointAbstractPollingEndpoint.receiveMessage() operation
rather than the whole poll.isReceiveOnlyAdvice in class AbstractPollingEndpointadvice - The advice.protected void applyReceiveOnlyAdviceChain(Collection<Advice> chain)
AbstractPollingEndpointAbstractPollingEndpoint.receiveMessage() calls.applyReceiveOnlyAdviceChain in class AbstractPollingEndpointchain - the advice chain Collection.protected void doStart()
AbstractEndpointAbstractEndpoint.lifecycleLock.doStart in class AbstractPollingEndpointprotected void doStop()
AbstractEndpointAbstractEndpoint.lifecycleLock.doStop in class AbstractPollingEndpointprotected void onInit()
IntegrationObjectSupportonInit in class AbstractPollingEndpointpublic MessageChannel getOutputChannel()
protected 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