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(java.util.Collection<org.aopalliance.aop.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.
|
java.lang.String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
MessageSource<?> |
getMessageSource()
Return this endpoint's source.
|
org.springframework.messaging.MessageChannel |
getOutputChannel() |
protected java.lang.String |
getResourceKey()
Return the key under which the resource will be made available as an
attribute on the
IntegrationResourceHolder. |
protected java.lang.Object |
getResourceToBind()
Return a resource (MessageSource etc) to bind when using transaction
synchronization.
|
protected void |
handleMessage(org.springframework.messaging.Message<?> messageArg)
Handle a message.
|
protected boolean |
isReactive() |
protected boolean |
isReceiveOnlyAdvice(org.aopalliance.aop.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 org.springframework.messaging.Message<?> |
receiveMessage()
Obtain the next message (if one is available).
|
void |
setOutputChannel(org.springframework.messaging.MessageChannel outputChannel)
Specify the
MessageChannel where Messages should be sent. |
void |
setOutputChannelName(java.lang.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, getPollingFlux, getTaskExecutor, isSyncExecutor, setAdviceChain, setBeanClassLoader, setErrorHandler, setMaxMessagesPerPoll, setTaskExecutor, setTransactionSynchronizationFactory, setTriggerdestroy, doStop, getPhase, getRole, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, setTaskScheduler, start, stop, stopafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, 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(org.springframework.messaging.MessageChannel outputChannel)
MessageChannel where Messages should be sent.outputChannel - The output channel.public MessageSource<?> getMessageSource()
public void setOutputChannelName(java.lang.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 java.lang.String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class IntegrationObjectSupportprotected boolean isReceiveOnlyAdvice(org.aopalliance.aop.Advice advice)
AbstractPollingEndpointAbstractPollingEndpoint.receiveMessage() operation
rather than the whole poll.isReceiveOnlyAdvice in class AbstractPollingEndpointadvice - The advice.protected void applyReceiveOnlyAdviceChain(java.util.Collection<org.aopalliance.aop.Advice> chain)
AbstractPollingEndpointAbstractPollingEndpoint.receiveMessage() calls.applyReceiveOnlyAdviceChain in class AbstractPollingEndpointchain - the advice chain Collection.protected boolean isReactive()
isReactive in class AbstractPollingEndpointprotected void doStart()
AbstractEndpointAbstractEndpoint.lifecycleLock.doStart in class AbstractPollingEndpointprotected void doStop()
AbstractEndpointAbstractEndpoint.lifecycleLock.doStop in class AbstractPollingEndpointprotected void onInit()
IntegrationObjectSupportonInit in class AbstractPollingEndpointpublic org.springframework.messaging.MessageChannel getOutputChannel()
protected void handleMessage(org.springframework.messaging.Message<?> messageArg)
AbstractPollingEndpointhandleMessage in class AbstractPollingEndpointmessageArg - The message.protected org.springframework.messaging.Message<?> receiveMessage()
AbstractPollingEndpointreceiveMessage in class AbstractPollingEndpointprotected java.lang.Object getResourceToBind()
AbstractPollingEndpointgetResourceToBind in class AbstractPollingEndpointprotected java.lang.String getResourceKey()
AbstractPollingEndpointIntegrationResourceHolder. The default
ExpressionEvaluatingTransactionSynchronizationProcessor
makes this attribute available as a variable in SpEL expressions.getResourceKey in class AbstractPollingEndpoint