public class ResponseAssertionMessageProcessor extends AssertionMessageProcessor implements InterceptingMessageProcessor, Startable
ReactiveProcessor.ProcessingType
Modifier and Type | Field and Description |
---|---|
protected String |
responseExpression |
expression, expressionManager, message, needToMatchCount
LOCATION_KEY, ROOT_CONTAINER_NAME_KEY
PHASE_NAME
ANNOTATIONS_PROPERTY_NAME
Constructor and Description |
---|
ResponseAssertionMessageProcessor() |
Modifier and Type | Method and Description |
---|---|
org.reactivestreams.Publisher<CoreEvent> |
apply(org.reactivestreams.Publisher<CoreEvent> publisher)
Applies a
CoreEvent > function transforming a stream of CoreEvent 's. |
protected String |
generateTaskToken() |
CoreEvent |
process(CoreEvent event)
Invokes the MessageProcessor.
|
Boolean |
responseCountFailOrNullEvent() |
Boolean |
responseExpressionFailed() |
void |
setListener(Processor listener)
Set the MessageProcessor listener that will be invoked when a message is received or generated.
|
void |
setResponseCount(int responseCount) |
void |
setResponseExpression(String responseExpression) |
void |
setResponseSameTask(boolean responseSameTask) |
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, failureMessagePrefix, setCount, setExpression, setExpressionManager, setMessage
getAnnotation, getAnnotations, getLocation, getRootContainerLocation, setAnnotations
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isBlocking
getProcessingType
protected String responseExpression
public void start() throws InitialisationException
start
in interface Startable
start
in class AssertionMessageProcessor
InitialisationException
public CoreEvent process(CoreEvent event) throws MuleException
Processor
process
in interface Processor
process
in class AssertionMessageProcessor
event
- MuleEvent to be processedMuleException
public org.reactivestreams.Publisher<CoreEvent> apply(org.reactivestreams.Publisher<CoreEvent> publisher)
Processor
CoreEvent >
function transforming a stream of CoreEvent
's.
The default implementation delegates to Processor.process(CoreEvent)
and will:
Processor.process(CoreEvent)
returns null.protected String generateTaskToken()
public void verify() throws InterruptedException
AssertionMessageProcessor
verify
in interface org.mule.tck.processor.FlowAssertion
verify
in class AssertionMessageProcessor
InterruptedException
public Boolean responseCountFailOrNullEvent() throws InterruptedException
InterruptedException
public Boolean responseExpressionFailed()
public void setListener(Processor listener)
InterceptingMessageProcessor
setListener
in interface InterceptingMessageProcessor
public void setResponseExpression(String responseExpression)
public void setResponseCount(int responseCount)
public void setResponseSameTask(boolean responseSameTask)
Copyright © 2018. All rights reserved.