org.ikasan.framework.component.routing
Class XPathBooleanRouter
java.lang.Object
org.ikasan.framework.component.routing.XPathBooleanRouter
- All Implemented Interfaces:
- Router, FlowComponent
public class XPathBooleanRouter
- extends Object
- implements Router
XPath router evaluation based on evaluating the incoming XPath expressions into Boolean results. Where these results
are TRUE the associated XPath expression transition is added to the returned List for subsequent routing.
The pre-configured parser and a map of XPath expressions and their associated transition name are passed to this
class on construction.
- Author:
- Ikasan Development Team
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XPathBooleanRouter
public XPathBooleanRouter(DocumentBuilderFactory factory,
Map<String,String> xpathExpressionToTransition,
boolean returnsDefaultForNonMatches)
- Constructor
- Parameters:
factory - - configured DocumentBuilderFactoryxpathExpressionToTransition - - configured XPath expressions and associated transitionsreturnsDefaultForNonMatches - - use the 'default' transition if no other transitions are matched
XPathBooleanRouter
public XPathBooleanRouter(DocumentBuilderFactory factory,
Map<String,String> xpathExpressionToTransition)
- Constructor with no default transition supported.
- Parameters:
factory - - configured DocumentBuilderFactoryxpathExpressionToTransition - - configured XPath expressions and associated transitions
onEvent
public List<String> onEvent(Event event)
throws RouterException
- Implementation of the onEvent XPathBooleanRoute
- Specified by:
onEvent in interface Router
- Parameters:
event - The event to route
- Returns:
- List
- Throws:
RouterException - Exception if we could not route the event
Copyright © 2007-2012 Ikasan. All Rights Reserved.