org.mactor.framework.extensioninterface
Interface MessageSelectorCommand

All Known Subinterfaces:
MessageSelectorCommandExecutor
All Known Implementing Classes:
BshMessageSelectorCommandExecutor, GreedyMessageSelector, JavaMessageSelectorCommandExecutor, ShellMessageSelectorCommandExecutor, XPathIgnoreNsMessageSelector, XPathIgnoreNsRegExpMessageSelector

public interface MessageSelectorCommand

The interface that must be implemented by message selector commands

From a testspec: <message-selector name="MyMessageSelector" command="java:class that implements the MessageSelectorCommand interface"/>

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
 

Method Detail

setParams

void setParams(java.util.List<java.lang.String> params)
               throws MactorException
This method is ivoked by the test runner before selector is passed to the message broker during subscribe

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

boolean isAcceptableMessage(Message message)
                            throws MactorException
The method invoked by the testrunner to build the messgte.

Parameters:
context - contains information about the context of the test that might be useful (such as all messages sent/received so far in the test)
Returns:
the built message
Throws:
MactorException - if some problem occured (this exception is logged and ignored)


Copyright © 2008. All Rights Reserved.