public class ResponseAssertionMessageProcessor extends AssertionMessageProcessor implements InterceptingMessageProcessor, FlowConstructAware, Startable, NonBlockingSupported
Modifier and Type | Field and Description |
---|---|
protected String |
responseExpression |
expression, expressionManager, flowConstruct, message, needToMatchCount, timeout
PHASE_NAME
Constructor and Description |
---|
ResponseAssertionMessageProcessor() |
Modifier and Type | Method and Description |
---|---|
MuleEvent |
process(MuleEvent event)
Invokes the MessageProcessor.
|
MuleEvent |
processRequest(MuleEvent event) |
MuleEvent |
processResponse(MuleEvent event) |
Boolean |
responseCountFailOrNullEvent() |
Boolean |
responseExpressionFailed() |
void |
setListener(MessageProcessor listener)
Set the MessageProcessor listener on a message source which will be invoked
when a message is received or generated.
|
void |
setResponseCount(int responseCount) |
void |
setResponseExpression(String responseExpression) |
void |
setResponseSameThread(boolean responseSameThread) |
void |
start() |
void |
verify()
If result evaluated to false in some processed event or the last processed
event was null, then assert fails, otherwise:
count was set & count processes were done => ok
count was set & count processes were not done => fail
count was not set & at least one processing were done => ok
|
countFailOrNullEvent, expressionFailed, reset, setCount, setExpression, setFlowConstruct, setMessage
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setFlowConstruct
protected String responseExpression
public void start() throws InitialisationException
start
in interface Startable
start
in class AssertionMessageProcessor
InitialisationException
public MuleEvent process(MuleEvent event) throws MuleException
MessageProcessor
process
in interface MessageProcessor
process
in class AssertionMessageProcessor
event
- MuleEvent to be processedMuleException
public MuleEvent processRequest(MuleEvent event) throws MuleException
MuleException
public MuleEvent processResponse(MuleEvent event) throws MuleException
MuleException
public void verify() throws InterruptedException
AssertionMessageProcessor
verify
in class AssertionMessageProcessor
InterruptedException
public Boolean responseCountFailOrNullEvent() throws InterruptedException
InterruptedException
public Boolean responseExpressionFailed()
public void setListener(MessageProcessor listener)
MessageSource
setListener
in interface MessageSource
public void setResponseExpression(String responseExpression)
public void setResponseCount(int responseCount)
public void setResponseSameThread(boolean responseSameThread)
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.