Class DynamicRouterConfiguration
java.lang.Object
org.apache.camel.component.dynamicrouter.DynamicRouterConfiguration
This class encapsulates all configuration items for the Dynamic Router EIP component.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionChannel for the Dynamic Router.When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the action (subscribe or unsubscribe) by using this URI path variable.When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the destination URI by using this URI param.When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the expression language for creating thePredicate
by using this URI param.When sending messages to the control channel without using aDynamicRouterControlMessage
, specify thePredicate
by using this URI param.org.apache.camel.Predicate
When sending messages to the control channel without using aDynamicRouterControlMessage
, specify thePredicate
by using this URI param.When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the subscription priority by using this URI param.Gets the behavior of the Dynamic Router when routing participants are selected to receive an incoming exchange.When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the subscribe channel by using this URI path variable.When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the subscription ID by using this URI param.boolean
Flag to ensure synchronous processing.boolean
Flag to log a warning if no predicates match for an exchange.void
Parse the URI path for configuration parameters.void
setChannel
(String channel) Channel for the Dynamic Router.void
setControlAction
(String controlAction) When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the action (subscribe or unsubscribe) by using this URI path variable.void
setDestinationUri
(String destinationUri) When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the destination URI by using this URI param.void
setExpressionLanguage
(String expressionLanguage) When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the expression language for creating thePredicate
by using this URI param.void
setPredicate
(String predicate) When sending messages to the control channel without using aDynamicRouterControlMessage
, specify thePredicate
by using this URI param.void
setPredicateBean
(org.apache.camel.Predicate predicateBean) When sending messages to the control channel without using aDynamicRouterControlMessage
, specify thePredicate
by using this URI param.void
setPriority
(Integer priority) When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the subscription priority by using this URI param.void
setRecipientMode
(String recipientMode) Sets the behavior of the Dynamic Router when routing participants are selected to receive an incoming exchange.void
setSubscribeChannel
(String subscribeChannel) When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the subscribe channel by using this URI path variable.void
setSubscriptionId
(String subscriptionId) When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the subscription ID by using this URI param.void
setSynchronous
(boolean synchronous) Flag to ensure synchronous processing.void
setWarnDroppedMessage
(boolean warnDroppedMessage) Flag to log a warning if no predicates match for an exchange.
-
Constructor Details
-
DynamicRouterConfiguration
public DynamicRouterConfiguration()
-
-
Method Details
-
getChannel
Channel for the Dynamic Router. For example, if the Dynamic Router URI is "dynamic-router://test", then the channel is "test". Channels are a way of keeping routing participants, their rules, and exchanges logically separate from the participants, rules, and exchanges on other channels. This can be seen as analogous to VLANs in networking.- Returns:
- the channel
-
setChannel
Channel for the Dynamic Router. For example, if the Dynamic Router URI is "dynamic-router://test", then the channel is "test". Channels are a way of keeping routing participants, their rules, and exchanges logically separate from the participants, rules, and exchanges on other channels. This can be seen as analogous to VLANs in networking.- Parameters:
channel
- the channel
-
getControlAction
When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the action (subscribe or unsubscribe) by using this URI path variable.- Returns:
- the control action -- subscribe or unsubscribe
-
setControlAction
When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the action (subscribe or unsubscribe) by using this URI path variable.- Parameters:
controlAction
- the control action -- subscribe or unsubscribe
-
getSubscribeChannel
When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the subscribe channel by using this URI path variable.- Returns:
- subscribe channel name
-
setSubscribeChannel
When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the subscribe channel by using this URI path variable.- Parameters:
subscribeChannel
- subscribe channel name
-
getSubscriptionId
When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the subscription ID by using this URI param. If one is not supplied, one will be generated and returned.- Returns:
- the subscription ID
-
setSubscriptionId
When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the subscription ID by using this URI param. If one is not supplied, one will be generated and returned.- Parameters:
subscriptionId
- the subscription ID
-
getDestinationUri
When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the destination URI by using this URI param.- Returns:
- the destination URI
-
setDestinationUri
When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the destination URI by using this URI param.- Parameters:
destinationUri
- the destination URI
-
getPriority
When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the subscription priority by using this URI param. Lower numbers have higher priority.- Returns:
- the subscription priority
-
setPriority
When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the subscription priority by using this URI param. Lower numbers have higher priority.- Parameters:
priority
- the subscription priority
-
getPredicate
When sending messages to the control channel without using aDynamicRouterControlMessage
, specify thePredicate
by using this URI param. Only predicates that can be expressed as a string (e.g., using the Simple language) can be specified via URI param. Other types must be sent via control channel POJO or as the message body.- Returns:
- the predicate for evaluating exchanges
-
setPredicate
When sending messages to the control channel without using aDynamicRouterControlMessage
, specify thePredicate
by using this URI param. Only predicates that can be expressed as a string (e.g., using the Simple language) can be specified via URI param. Other types must be sent via control channel POJO or as the message body.- Parameters:
predicate
- the predicate for evaluating exchanges
-
getPredicateBean
public org.apache.camel.Predicate getPredicateBean()When sending messages to the control channel without using aDynamicRouterControlMessage
, specify thePredicate
by using this URI param. Only predicates that can be expressed as a string (e.g., using the Simple language) can be specified via URI param. Other types must be sent via control channel POJO or as the message body.- Returns:
- the predicate for evaluating exchanges
-
setPredicateBean
public void setPredicateBean(org.apache.camel.Predicate predicateBean) When sending messages to the control channel without using aDynamicRouterControlMessage
, specify thePredicate
by using this URI param. Only predicates that can be expressed as a string (e.g., using the Simple language) can be specified via URI param. Other types must be sent via control channel POJO or as the message body.- Parameters:
predicateBean
- the predicate for evaluating exchanges
-
getExpressionLanguage
When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the expression language for creating thePredicate
by using this URI param. The default is "simple".- Returns:
- the expression language name
-
setExpressionLanguage
When sending messages to the control channel without using aDynamicRouterControlMessage
, specify the expression language for creating thePredicate
by using this URI param. The default is "simple".- Parameters:
expressionLanguage
- the expression language name
-
getRecipientMode
Gets the behavior of the Dynamic Router when routing participants are selected to receive an incoming exchange. If the mode is "firstMatch", then the exchange is routed only to the first participant that has a matching predicate. If the mode is "allMatch", then the exchange is routed to all participants that have a matching predicate.- Returns:
- the recipient mode
-
setRecipientMode
Sets the behavior of the Dynamic Router when routing participants are selected to receive an incoming exchange. If the mode is "firstMatch", then the exchange is routed only to the first participant that has a matching predicate. If the mode is "allMatch", then the exchange is routed to all participants that have a matching predicate.- Parameters:
recipientMode
- the recipient mode
-
isSynchronous
public boolean isSynchronous()Flag to ensure synchronous processing.- Returns:
- true if processing will be synchronous, false otherwise
-
setSynchronous
public void setSynchronous(boolean synchronous) Flag to ensure synchronous processing.- Parameters:
synchronous
- flag if processing will be synchronous
-
isWarnDroppedMessage
public boolean isWarnDroppedMessage()Flag to log a warning if no predicates match for an exchange.- Returns:
- true if logging a warning when no predicates match an exchange, false otherwise
-
setWarnDroppedMessage
public void setWarnDroppedMessage(boolean warnDroppedMessage) Flag to log a warning if no predicates match for an exchange.- Parameters:
warnDroppedMessage
- flag to log warnings when no predicates match
-
parsePath
Parse the URI path for configuration parameters.- Parameters:
path
- the URI path to parse
-