|
Spring Integration | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.integration.context.IntegrationObjectSupport org.springframework.integration.handler.AbstractMessageHandler org.springframework.integration.router.AbstractMessageRouter org.springframework.integration.router.AbstractMappingMessageRouter
public abstract class AbstractMappingMessageRouter
Base class for all Message Routers that support mapping from arbitrary String values to Message Channel names.
Field Summary |
---|
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport |
---|
logger |
Fields inherited from interface org.springframework.core.Ordered |
---|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Constructor Summary | |
---|---|
AbstractMappingMessageRouter()
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.springframework.integration.router.AbstractMessageRouter |
---|
getComponentType, getMessagingTemplate, getRequiredConversionService, handleMessageInternal, setApplySequence, setDefaultOutputChannel, setIgnoreSendFailures, setTimeout |
Methods inherited from class org.springframework.integration.handler.AbstractMessageHandler |
---|
getOrder, handleMessage, setOrder, setShouldTrack |
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport |
---|
afterPropertiesSet, getBeanFactory, getComponentName, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.springframework.integration.context.NamedComponent |
---|
getComponentName |
Constructor Detail |
---|
public AbstractMappingMessageRouter()
Method Detail |
---|
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
|
Spring Integration | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |