public abstract class AbstractMappingMessageRouter extends AbstractMessageRouter implements MappingMessageRouterManagement
logger
Constructor and Description |
---|
AbstractMappingMessageRouter() |
Modifier and Type | Method and Description |
---|---|
protected java.util.Collection<MessageChannel> |
determineTargetChannels(Message<?> message)
Subclasses must implement this method to return a Collection of zero or more
MessageChannels to which the given Message should be routed.
|
protected abstract java.util.List<java.lang.Object> |
getChannelKeys(Message<?> message)
Subclasses must implement this method to return the channel keys.
|
protected java.util.Map<java.lang.String,java.lang.String> |
getChannelMappings()
Returns an unmodifiable version of the channel mappings.
|
void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
removeChannelMapping(java.lang.String key)
Remove a channel mapping for the given key if present.
|
void |
setChannelMapping(java.lang.String key,
java.lang.String channelName)
Add a channel mapping from the provided key to channel name.
|
void |
setChannelMappings(java.util.Map<java.lang.String,java.lang.String> channelMappings)
Provide mappings from channel keys to channel names.
|
void |
setChannelResolver(ChannelResolver channelResolver)
Specify the
ChannelResolver strategy to use. |
void |
setPrefix(java.lang.String prefix)
Specify a prefix to be added to each channel name prior to resolution.
|
void |
setResolutionRequired(boolean resolutionRequired)
Specify whether this router should ignore any failure to resolve a channel name to
an actual MessageChannel instance when delegating to the ChannelResolver strategy.
|
void |
setSuffix(java.lang.String suffix)
Specify a suffix to be added to each channel name prior to resolution.
|
getComponentType, getMessagingTemplate, getRequiredConversionService, handleMessageInternal, setApplySequence, setDefaultOutputChannel, setIgnoreSendFailures, setTimeout
getOrder, handleMessage, setOrder, setShouldTrack
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getComponentName
public void setChannelMappings(java.util.Map<java.lang.String,java.lang.String> channelMappings)
ChannelResolver
.public void setChannelResolver(ChannelResolver channelResolver)
ChannelResolver
strategy to use.
The default is a BeanFactoryChannelResolver.
This is considered an infrastructural configuration option and
as of 2.1 has been deprecated as a configuration-driven attribute.public void setPrefix(java.lang.String prefix)
public void setSuffix(java.lang.String suffix)
public void setResolutionRequired(boolean resolutionRequired)
protected java.util.Map<java.lang.String,java.lang.String> getChannelMappings()
@ManagedOperation public void setChannelMapping(java.lang.String key, java.lang.String channelName)
setChannelMapping
in interface MappingMessageRouterManagement
@ManagedOperation public void removeChannelMapping(java.lang.String key)
removeChannelMapping
in interface MappingMessageRouterManagement
public void onInit()
IntegrationObjectSupport
onInit
in class IntegrationObjectSupport
protected abstract java.util.List<java.lang.Object> getChannelKeys(Message<?> message)
protected java.util.Collection<MessageChannel> determineTargetChannels(Message<?> message)
AbstractMessageRouter
determineTargetChannels
in class AbstractMessageRouter