public abstract class AbstractMappingMessageRouter extends AbstractMessageRouter implements MappingMessageRouterManagement
logger| Constructor and Description |
|---|
AbstractMappingMessageRouter() |
| Modifier and Type | Method and Description |
|---|---|
protected 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.
|
protected abstract java.util.List<java.lang.Object> |
getChannelKeys(org.springframework.messaging.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(org.springframework.messaging.core.DestinationResolver<org.springframework.messaging.MessageChannel> channelResolver)
Specify the
DestinationResolver 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, setTimeoutgetOrder, handleMessage, setOrder, setShouldTrackafterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetComponentNamepublic void setChannelMappings(java.util.Map<java.lang.String,java.lang.String> channelMappings)
DestinationResolver.public void setChannelResolver(org.springframework.messaging.core.DestinationResolver<org.springframework.messaging.MessageChannel> channelResolver)
DestinationResolver 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 MappingMessageRouterManagementpublic void onInit()
IntegrationObjectSupportonInit in class IntegrationObjectSupportprotected abstract java.util.List<java.lang.Object> getChannelKeys(org.springframework.messaging.Message<?> message)
protected java.util.Collection<org.springframework.messaging.MessageChannel> determineTargetChannels(org.springframework.messaging.Message<?> message)
AbstractMessageRouterdetermineTargetChannels in class AbstractMessageRouter