org.mactor.extensions.xml
Class XPathIgnoreNsRegExpMessageSelector
java.lang.Object
org.mactor.extensions.xml.XPathIgnoreNsRegExpMessageSelector
- All Implemented Interfaces:
- MessageSelectorCommand
public class XPathIgnoreNsRegExpMessageSelector
- extends java.lang.Object
- implements MessageSelectorCommand
Selects all messages matching the XPath/regexp expressions specified in the
parameters.
The syntax of a parameters are:
[XPath expression that selects the single attribute or element ]==[a regular
expression that the field must match]
I.e. the following setup matches
alle messages containing an Name field with a value starting with 'MrMan'
<message_selector command="java:org.mactor.extensions.xml.XPathIgnoreNsMessageSelector">
<param>//Name==MrMan.*</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 |
XPathIgnoreNsRegExpMessageSelector
public XPathIgnoreNsRegExpMessageSelector()
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.