org.jboss.soa.esb.actions.cbr
Class RegexRouter

java.lang.Object
  extended by org.jboss.soa.esb.actions.cbr.RegexRouter
All Implemented Interfaces:
ContentBasedRouter

public class RegexRouter
extends java.lang.Object

Regex Content Based Router implementation.

Author:
tom.fennelly@jboss.com

Field Summary
protected  org.apache.log4j.Logger logger
           
 
Constructor Summary
RegexRouter()
           
 
Method Summary
 java.util.Map<java.lang.String,RoutingRule> buildRoutingMap(java.util.Properties rules)
           
 java.util.Map<java.lang.String,RoutingRule> getRoutingMap()
           
 java.util.List<java.lang.String> route(java.lang.String ruleSet, boolean ruleReload, Message message, java.util.List<java.lang.Object> objectList)
          Route a message using a certain ruleSet.
 java.util.List<java.lang.String> route(java.lang.String ruleSet, java.lang.String ruleLanguage, boolean ruleReload, Message message, java.util.List<java.lang.Object> objectList)
          Route a message using a certain ruleSet and reference a custom Domain Specific Language (DSL).
 void setConfigTree(ConfigTree configTree)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected org.apache.log4j.Logger logger
Constructor Detail

RegexRouter

public RegexRouter()
Method Detail

buildRoutingMap

public java.util.Map<java.lang.String,RoutingRule> buildRoutingMap(java.util.Properties rules)
                                                            throws MessageRouterException
Throws:
MessageRouterException

setConfigTree

public void setConfigTree(ConfigTree configTree)
                   throws MessageRouterException
Specified by:
setConfigTree in interface ContentBasedRouter
Throws:
MessageRouterException

getRoutingMap

public java.util.Map<java.lang.String,RoutingRule> getRoutingMap()

route

public java.util.List<java.lang.String> route(java.lang.String ruleSet,
                                              java.lang.String ruleLanguage,
                                              boolean ruleReload,
                                              Message message,
                                              java.util.List<java.lang.Object> objectList)
                                       throws MessageRouterException
Description copied from interface: ContentBasedRouter
Route a message using a certain ruleSet and reference a custom Domain Specific Language (DSL).

Specified by:
route in interface ContentBasedRouter
Parameters:
ruleSet - - String reference to a file which contains a ruleSet.
ruleLanguage - - String reference to a file which contais a custom rule language definition
ruleReload - - if set to true, a ruleSet update should result in reloading the ruleSet.
message - - Message that needs routing.
objectList - - a list with additional objects (typically pulled from the message)
Returns:
List of routing destinations.
Throws:
MessageRouterException

route

public java.util.List<java.lang.String> route(java.lang.String ruleSet,
                                              boolean ruleReload,
                                              Message message,
                                              java.util.List<java.lang.Object> objectList)
                                       throws MessageRouterException
Description copied from interface: ContentBasedRouter
Route a message using a certain ruleSet.

Specified by:
route in interface ContentBasedRouter
Parameters:
ruleSet - - String reference to a file which contains a ruleSet.
ruleReload - - if set to true, a ruleSet update should result in reloading the ruleSet.
message - - Message that needs routing.
objectList - - a list with additional objects (typically pulled from the message)
Returns:
List of routing destinations.
Throws:
MessageRouterException