Class DynamicRouterConfiguration


  • @UriParams
    public class DynamicRouterConfiguration
    extends Object
    This class encapsulates all configuration items for the Dynamic Router EIP component.
    • Constructor Detail

      • DynamicRouterConfiguration

        public DynamicRouterConfiguration()
    • Method Detail

      • getChannel

        public String 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

        public void setChannel​(String channel)
        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

        public String getControlAction()
        When sending messages to the control channel without using a DynamicRouterControlMessage, specify the action (subscribe or unsubscribe) by using this URI path variable.
        Returns:
        the control action -- subscribe or unsubscribe
      • setControlAction

        public void setControlAction​(String controlAction)
        When sending messages to the control channel without using a DynamicRouterControlMessage, specify the action (subscribe or unsubscribe) by using this URI path variable.
        Parameters:
        controlAction - the control action -- subscribe or unsubscribe
      • getSubscribeChannel

        public String getSubscribeChannel()
        When sending messages to the control channel without using a DynamicRouterControlMessage, specify the subscribe channel by using this URI path variable.
        Returns:
        subscribe channel name
      • setSubscribeChannel

        public void setSubscribeChannel​(String subscribeChannel)
        When sending messages to the control channel without using a DynamicRouterControlMessage, specify the subscribe channel by using this URI path variable.
        Parameters:
        subscribeChannel - subscribe channel name
      • getSubscriptionId

        public String getSubscriptionId()
        When sending messages to the control channel without using a DynamicRouterControlMessage, 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

        public void setSubscriptionId​(String subscriptionId)
        When sending messages to the control channel without using a DynamicRouterControlMessage, 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

        public String getDestinationUri()
        When sending messages to the control channel without using a DynamicRouterControlMessage, specify the destination URI by using this URI param.
        Returns:
        the destination URI
      • setDestinationUri

        public void setDestinationUri​(String destinationUri)
        When sending messages to the control channel without using a DynamicRouterControlMessage, specify the destination URI by using this URI param.
        Parameters:
        destinationUri - the destination URI
      • getPriority

        public Integer getPriority()
        When sending messages to the control channel without using a DynamicRouterControlMessage, specify the subscription priority by using this URI param. Lower numbers have higher priority.
        Returns:
        the subscription priority
      • setPriority

        public void setPriority​(Integer priority)
        When sending messages to the control channel without using a DynamicRouterControlMessage, specify the subscription priority by using this URI param. Lower numbers have higher priority.
        Parameters:
        priority - the subscription priority
      • getPredicate

        public String getPredicate()
        When sending messages to the control channel without using a DynamicRouterControlMessage, specify the Predicate 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

        public void setPredicate​(String predicate)
        When sending messages to the control channel without using a DynamicRouterControlMessage, specify the Predicate 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 a DynamicRouterControlMessage, specify the Predicate 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 a DynamicRouterControlMessage, specify the Predicate 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

        public String getExpressionLanguage()
        When sending messages to the control channel without using a DynamicRouterControlMessage, specify the expression language for creating the Predicate by using this URI param. The default is "simple".
        Returns:
        the expression language name
      • setExpressionLanguage

        public void setExpressionLanguage​(String expressionLanguage)
        When sending messages to the control channel without using a DynamicRouterControlMessage, specify the expression language for creating the Predicate by using this URI param. The default is "simple".
        Parameters:
        expressionLanguage - the expression language name
      • getRecipientMode

        public String 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

        public void setRecipientMode​(String recipientMode)
        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

        public void parsePath​(String path)
        Parse the URI path for configuration parameters.
        Parameters:
        path - the URI path to parse