Spring Integration

org.springframework.integration.channel
Class MapBasedChannelResolver

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

public class MapBasedChannelResolver
extends 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(Map<String,? extends MessageChannel> channelMap)
          Create a ChannelResolver that uses the provided Map.
 
Method Summary
 MessageChannel resolveChannelName(String channelName)
          Return the MessageChannel for the given name.
 void setChannelMap(Map<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(Map<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(Map<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(String channelName)
Description copied from interface: ChannelResolver
Return the MessageChannel for the given name.

Specified by:
resolveChannelName in interface ChannelResolver

Spring Integration

Copyright © 2010. All Rights Reserved.