Class ExpressionEvaluatingRouter
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.ExpressionEvaluatingRouter
- All Implemented Interfaces:
org.reactivestreams.Subscriber<Message<?>>
,Aware
,BeanFactoryAware
,BeanNameAware
,DisposableBean
,InitializingBean
,ApplicationContextAware
,Lifecycle
,Ordered
,ExpressionCapable
,Orderable
,IntegrationPattern
,MessageRouter
,NamedComponent
,IntegrationManagement
,ManageableLifecycle
,MappingMessageRouterManagement
,TrackableComponent
,MessageHandler
,reactor.core.CoreSubscriber<Message<?>>
A Message Router implementation that evaluates the specified SpEL
expression. The result of evaluation will typically be a String to be
resolved to a channel name or a Collection (or Array) of strings.
- Since:
- 2.0
- Author:
- Mark Fisher, Gary Russell
-
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, logger
Fields inherited from interface org.springframework.integration.support.management.IntegrationManagement
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionExpressionEvaluatingRouter
(String expressionString) Construct an instance by parsing the supplied expression string.ExpressionEvaluatingRouter
(Expression expression) Construct an instance with the suppliedExpression
. -
Method Summary
Methods inherited from class org.springframework.integration.router.AbstractMappingMessageRouter
determineTargetChannels, getChannelMappings, getDynamicChannelNames, removeChannelMapping, replaceChannelMappings, setChannelKeyFallback, setChannelMapping, setChannelMappings, setDefaultOutputChannel, setDefaultOutputChannelName, setDynamicChannelLimit, setPrefix, setResolutionRequired, setSuffix
Methods inherited from class org.springframework.integration.router.AbstractMessageRouter
getComponentType, getDefaultOutputChannel, getIntegrationPatternType, getMessagingTemplate, getRequiredConversionService, handleMessageInternal, setApplySequence, setIgnoreSendFailures, setSendTimeout
Methods inherited from class org.springframework.integration.handler.AbstractMessageHandler
handleMessage, onComplete, onError, onNext, onSubscribe, setObservationConvention
Methods 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, shouldTrack
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface reactor.core.CoreSubscriber
currentContext
Methods inherited from interface org.springframework.integration.support.management.IntegrationManagement
getThisAs
Methods inherited from interface org.springframework.integration.support.context.NamedComponent
getBeanName, getComponentName
-
Constructor Details
-
ExpressionEvaluatingRouter
Construct an instance by parsing the supplied expression string.- Parameters:
expressionString
- the expression string.
-
ExpressionEvaluatingRouter
Construct an instance with the suppliedExpression
.- Parameters:
expression
- the expression.
-
-
Method Details
-
onInit
public final void onInit()Description copied from class:IntegrationObjectSupport
Subclasses may implement this for initialization logic.- Overrides:
onInit
in classAbstractMappingMessageRouter
-
start
public void start()- Specified by:
start
in interfaceLifecycle
- Specified by:
start
in interfaceManageableLifecycle
-
stop
public void stop()- Specified by:
stop
in interfaceLifecycle
- Specified by:
stop
in interfaceManageableLifecycle
-
isRunning
public boolean isRunning()- Specified by:
isRunning
in interfaceLifecycle
- Specified by:
isRunning
in interfaceManageableLifecycle
-
getChannelKeys
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 classAbstractMappingMessageRouter
- Parameters:
message
- The message.- Returns:
- The channel keys.
-