@ManagedResource public abstract class AbstractMessageRouter extends AbstractMessageHandler
logger| Constructor and Description |
|---|
AbstractMessageRouter() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.util.Collection<org.springframework.messaging.MessageChannel> |
determineTargetChannels(org.springframework.messaging.Message<?> message)
Subclasses must implement this method to return a Collection of zero or more
MessageChannels to which the given Message should be routed.
|
java.lang.String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
protected MessagingTemplate |
getMessagingTemplate()
Provides
MessagingTemplate access for subclasses. |
protected org.springframework.core.convert.ConversionService |
getRequiredConversionService() |
protected void |
handleMessageInternal(org.springframework.messaging.Message<?> message) |
void |
setApplySequence(boolean applySequence)
Specify whether to apply the sequence number and size headers to the messages prior to sending to the recipient
channels.
|
void |
setDefaultOutputChannel(org.springframework.messaging.MessageChannel defaultOutputChannel)
Set the default channel where Messages should be sent if channel resolution
fails to return any channels.
|
void |
setIgnoreSendFailures(boolean ignoreSendFailures)
Specify whether send failures for one or more of the recipients should be ignored.
|
void |
setTimeout(long timeout)
Set the timeout for sending a message to the resolved channel.
|
getOrder, handleMessage, setOrder, setShouldTrackafterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, onInit, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetComponentNamepublic void setDefaultOutputChannel(org.springframework.messaging.MessageChannel defaultOutputChannel)
MessageDeliveryException.
If messages shall be ignored (dropped) instead, please provide a NullChannel.public void setTimeout(long timeout)
public void setIgnoreSendFailures(boolean ignoreSendFailures)
false meaning that an Exception will be thrown whenever a send fails. To override this and suppress
Exceptions, set the value to true.public void setApplySequence(boolean applySequence)
false meaning that sequence headers will not be
applied. If planning to use an Aggregator downstream with the default correlation and completion strategies, you
should set this flag to true.public java.lang.String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class AbstractMessageHandlerprotected MessagingTemplate getMessagingTemplate()
MessagingTemplate access for subclasses.protected org.springframework.core.convert.ConversionService getRequiredConversionService()
protected abstract java.util.Collection<org.springframework.messaging.MessageChannel> determineTargetChannels(org.springframework.messaging.Message<?> message)
protected void handleMessageInternal(org.springframework.messaging.Message<?> message)
handleMessageInternal in class AbstractMessageHandler