Class HeaderValueRouter

All Implemented Interfaces:
org.reactivestreams.Subscriber<Message<?>>, Aware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, ApplicationContextAware, Ordered, ExpressionCapable, Orderable, IntegrationPattern, MessageRouter, NamedComponent, IntegrationManagement, MappingMessageRouterManagement, TrackableComponent, MessageHandler, reactor.core.CoreSubscriber<Message<?>>

public class HeaderValueRouter extends AbstractMappingMessageRouter
A Message Router that resolves the MessageChannel from a header value.
Since:
1.0.3
Author:
Oleg Zhurakousky, Mark Fisher
  • Constructor Details

    • HeaderValueRouter

      public HeaderValueRouter(String headerName)
      Create a router that uses the provided header name to lookup a channel.
      Parameters:
      headerName - The header name.
  • Method Details

    • getChannelKeys

      protected List<Object> getChannelKeys(Message<?> message)
      Description copied from class: AbstractMappingMessageRouter
      Subclasses must implement this method to return the channel keys. A "key" might be present in this router's "channelMappings", or it could be the channel's name or even the Message Channel instance itself.
      Specified by:
      getChannelKeys in class AbstractMappingMessageRouter
      Parameters:
      message - The message.
      Returns:
      The channel keys.