org.mactor.extensions.xml
Class XPathIgnoreNsMessageSelector
java.lang.Object
org.mactor.extensions.xml.XPathIgnoreNsMessageSelector
- All Implemented Interfaces:
- MessageSelectorCommand
public class XPathIgnoreNsMessageSelector
- extends java.lang.Object
- implements MessageSelectorCommand
Selects all messages matching the XPath/value expressions specified in the
parameters.
The syntax of a parameters are:
[XPath expression that selects the single attribute or element ]==[value that
the selected field must be equal to]
I.e. the following setup matches
alle messages containing an Orderid field with the value 5
<message_selector command="java:org.mactor.extensions.xml.XPathIgnoreNsMessageSelector">
<param>//OrderId==5</param>
</message_selector>
Namespace information in the evaluated messages is ignored, so the XPath
expressions must not include namespace prefixes
- Author:
- Lars Ivar Almli
Method Summary |
boolean |
isAcceptableMessage(Message message)
The method invoked by the testrunner to build the messgte. |
void |
setParams(java.util.List<java.lang.String> params)
This method is ivoked by the test runner before selector is passed to the
message broker during subscribe |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XPathIgnoreNsMessageSelector
public XPathIgnoreNsMessageSelector()
setParams
public void setParams(java.util.List<java.lang.String> params)
throws MactorException
- Description copied from interface:
MessageSelectorCommand
- This method is ivoked by the test runner before selector is passed to the
message broker during subscribe
- Specified by:
setParams
in interface MessageSelectorCommand
- Parameters:
params
- the list of parameteres specifed for the given node in the
test-spec xml (after the ##{...} substitution has been
performed)
- Throws:
MactorException
- if some problem occured (this will cause the test to fail)
isAcceptableMessage
public boolean isAcceptableMessage(Message message)
- Description copied from interface:
MessageSelectorCommand
- The method invoked by the testrunner to build the messgte.
- Specified by:
isAcceptableMessage
in interface MessageSelectorCommand
- Returns:
- the built message
Copyright © 2008. All Rights Reserved.