Class HeaderValueRouter
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.handler.MessageHandlerSupport
org.springframework.integration.handler.AbstractMessageHandler
org.springframework.integration.router.AbstractMessageRouter
org.springframework.integration.router.AbstractMappingMessageRouter
org.springframework.integration.router.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<?>>
A Message Router that resolves the MessageChannel from a header value.
- Since:
- 1.0.3
- Author:
- Oleg Zhurakousky, Mark Fisher
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagement
IntegrationManagement.ManagementOverrides -
Field Summary
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER, loggerFields inherited from interface org.springframework.integration.support.management.IntegrationManagement
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionHeaderValueRouter(String headerName) Create a router that uses the provided header name to lookup a channel. -
Method Summary
Modifier and TypeMethodDescriptiongetChannelKeys(Message<?> message) Subclasses must implement this method to return the channel keys.Methods inherited from class org.springframework.integration.router.AbstractMappingMessageRouter
determineTargetChannels, getChannelMappings, getDynamicChannelNames, onInit, removeChannelMapping, replaceChannelMappings, setChannelKeyFallback, setChannelMapping, setChannelMappings, setDefaultOutputChannel, setDefaultOutputChannelName, setDynamicChannelLimit, setPrefix, setResolutionRequired, setSuffixMethods inherited from class org.springframework.integration.router.AbstractMessageRouter
getComponentType, getDefaultOutputChannel, getIntegrationPatternType, getMessagingTemplate, getRequiredConversionService, handleMessageInternal, setApplySequence, setIgnoreSendFailures, setSendTimeoutMethods inherited from class org.springframework.integration.handler.AbstractMessageHandler
handleMessage, onComplete, onError, onNext, onSubscribe, setObservationConventionMethods inherited from class org.springframework.integration.handler.MessageHandlerSupport
buildSendTimer, destroy, getManagedName, getManagedType, getMetricsCaptor, getObservationRegistry, getOrder, getOverrides, isLoggingEnabled, isObserved, registerMetricsCaptor, registerObservationRegistry, sendTimer, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, shouldTrackMethods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface reactor.core.CoreSubscriber
currentContextMethods inherited from interface org.springframework.integration.support.management.IntegrationManagement
getThisAsMethods inherited from interface org.springframework.integration.support.context.NamedComponent
getBeanName, getComponentName
-
Constructor Details
-
HeaderValueRouter
Create a router that uses the provided header name to lookup a channel.- Parameters:
headerName- The header name.
-
-
Method Details
-
getChannelKeys
Description copied from class:AbstractMappingMessageRouterSubclasses 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:
getChannelKeysin classAbstractMappingMessageRouter- Parameters:
message- The message.- Returns:
- The channel keys.
-