org.springframework.integration.channel
Class MapBasedChannelResolver

java.lang.Object
  extended by org.springframework.integration.channel.MapBasedChannelResolver
All Implemented Interfaces:
ChannelResolver

public class MapBasedChannelResolver
extends java.lang.Object
implements ChannelResolver

ChannelResolver implementation that resolves MessageChannel instances by matching the channel name against keys within a Map.

Author:
Mark Fisher

Constructor Summary
MapBasedChannelResolver()
          Empty constructor for use when providing the channel map via setChannelMap(Map).
MapBasedChannelResolver(java.util.Map<java.lang.String,? extends MessageChannel> channelMap)
          Create a ChannelResolver that uses the provided Map.
 
Method Summary
 MessageChannel resolveChannelName(java.lang.String channelName)
          Return the MessageChannel for the given name.
 void setChannelMap(java.util.Map<java.lang.String,? extends MessageChannel> channelMap)
          Provide a map of channels to be used by this resolver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapBasedChannelResolver

public MapBasedChannelResolver()
Empty constructor for use when providing the channel map via setChannelMap(Map).


MapBasedChannelResolver

public MapBasedChannelResolver(java.util.Map<java.lang.String,? extends MessageChannel> channelMap)
Create a ChannelResolver that uses the provided Map. Each String key will resolve to the associated channel value.

Method Detail

setChannelMap

public void setChannelMap(java.util.Map<java.lang.String,? extends MessageChannel> channelMap)
Provide a map of channels to be used by this resolver. Each String key will resolve to the associated channel value.


resolveChannelName

public MessageChannel resolveChannelName(java.lang.String channelName)
Description copied from interface: ChannelResolver
Return the MessageChannel for the given name.

Specified by:
resolveChannelName in interface ChannelResolver