org.ikasan.framework.component.routing
Class XPathSelectorRouter
java.lang.Object
org.ikasan.framework.component.routing.SingleResultRouter
org.ikasan.framework.component.routing.XPathSelectorRouter
- All Implemented Interfaces:
- Router, FlowComponent
public class XPathSelectorRouter
- extends SingleResultRouter
XPath router evaluation based on evaluating an incoming XPath expression into the node value.
The resulting node value is returned.
The pre-configured documentBuilderFactory and XPath selector expression
are passed to this class on construction.
- Author:
- Ikasan Development Team
|
Method Summary |
String |
evaluate(Event event)
Returns a single value as a result of evaluating the Event |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XPathSelectorRouter
public XPathSelectorRouter(DocumentBuilderFactory factory,
String xpathExpression,
boolean returnsDefaultForNonMatches)
- Constructor
- Parameters:
factory - - configured DocumentBuilderFactoryxpathExpression - - configured XPath expression to evaluatereturnsDefaultForNonMatches - - use the 'default' transition if no other transitions are matched
XPathSelectorRouter
public XPathSelectorRouter(DocumentBuilderFactory factory,
String xpathExpression)
- Constructor with no default transition supported.
- Parameters:
factory - - configured DocumentBuilderFactoryxpathExpression - - configured XPath expression
evaluate
public String evaluate(Event event)
throws RouterException
- Description copied from class:
SingleResultRouter
- Returns a single value as a result of evaluating the
Event
- Specified by:
evaluate in class SingleResultRouter
- Parameters:
event - to evaluate
- Returns:
- result
- Throws:
RouterException - Exception if we could not route the event
Copyright © 2007-2012 Ikasan. All Rights Reserved.