public abstract class AbstractFilteringMessageProcessor extends AbstractInterceptingMessageProcessor
InterceptingMessageProcessor
that can be easily be extended and
used for filtering message flow through a MessageProcessor
chain. The
default behaviour when the filter is not accepted is to return the request event.Modifier and Type | Field and Description |
---|---|
protected boolean |
onUnacceptedFlowConstruct |
protected boolean |
throwOnUnaccepted
Throw a FilterUnacceptedException when a message is rejected by the filter?
|
protected MessageProcessor |
unacceptedMessageProcessor
The
MessageProcessor that should be used to handle messages that are not accepted by the filter. |
logger, muleContext, next, notificationHandler
PROPERTY_NAME
Constructor and Description |
---|
AbstractFilteringMessageProcessor() |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
accept(MuleEvent event) |
protected MuleException |
filterUnacceptedException(MuleEvent event) |
MessageProcessor |
getUnacceptedMessageProcessor() |
protected MuleEvent |
handleUnaccepted(MuleEvent event) |
boolean |
isThrowOnUnaccepted() |
MuleEvent |
process(MuleEvent event)
Invokes the MessageProcessor.
|
void |
setThrowOnUnaccepted(boolean throwOnUnaccepted) |
void |
setUnacceptedMessageProcessor(MessageProcessor unacceptedMessageProcessor) |
addMessageProcessorPathElements, getAnnotation, getAnnotations, getListener, getMuleContext, isEventValid, processNext, setAnnotations, setListener, setMuleContext, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setListener
protected boolean throwOnUnaccepted
protected boolean onUnacceptedFlowConstruct
protected MessageProcessor unacceptedMessageProcessor
MessageProcessor
that should be used to handle messages that are not accepted by the filter.public MuleEvent process(MuleEvent event) throws MuleException
MessageProcessor
event
- MuleEvent to be processedMuleException
protected abstract boolean accept(MuleEvent event)
protected MuleEvent handleUnaccepted(MuleEvent event) throws MuleException
MuleException
protected MuleException filterUnacceptedException(MuleEvent event)
public MessageProcessor getUnacceptedMessageProcessor()
public void setUnacceptedMessageProcessor(MessageProcessor unacceptedMessageProcessor)
public boolean isThrowOnUnaccepted()
public void setThrowOnUnaccepted(boolean throwOnUnaccepted)
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.