public class AssertionMessageProcessor extends Object implements MessageProcessor, FlowConstructAware, Startable
Modifier and Type | Field and Description |
---|---|
protected String |
expression |
protected ExpressionManager |
expressionManager |
protected FlowConstruct |
flowConstruct |
protected String |
message |
protected boolean |
needToMatchCount |
protected int |
timeout |
PHASE_NAME
Constructor and Description |
---|
AssertionMessageProcessor() |
Modifier and Type | Method and Description |
---|---|
Boolean |
countFailOrNullEvent() |
Boolean |
expressionFailed() |
MuleEvent |
process(MuleEvent event)
Invokes the MessageProcessor.
|
void |
reset() |
void |
setCount(int count) |
void |
setExpression(String expression) |
void |
setFlowConstruct(FlowConstruct flowConstruct) |
void |
setMessage(String message) |
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
|
protected String expression
protected String message
protected boolean needToMatchCount
protected int timeout
protected FlowConstruct flowConstruct
protected ExpressionManager expressionManager
public void setExpression(String expression)
public void start() throws InitialisationException
start
in interface Startable
InitialisationException
public MuleEvent process(MuleEvent event) throws MuleException
MessageProcessor
process
in interface MessageProcessor
event
- MuleEvent to be processedMuleException
public void verify() throws InterruptedException
InterruptedException
public Boolean countFailOrNullEvent() throws InterruptedException
InterruptedException
public Boolean expressionFailed()
public void reset()
public void setFlowConstruct(FlowConstruct flowConstruct)
setFlowConstruct
in interface FlowConstructAware
public void setMessage(String message)
public void setCount(int count)
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.