public class WireTap extends AbstractMessageProcessorOwner implements MessageProcessor, NonBlockingSupported
WireTap MessageProcessor allows inspection of messages in a flow.
The incoming message is is sent to both the primary and wiretap outputs. The flow of the primary output will be unmodified and a copy of the message used for the wiretap output.
An optional filter can be used to filter which message are sent to the wiretap output, this filter does not affect the flow to the primary output. If there is an error sending to the wiretap output no exception will be thrown but rather an error logged.
EIP Reference: http://www.eaipatterns.com/WireTap.html
| Modifier and Type | Field and Description |
|---|---|
protected Filter |
filter |
protected MessageProcessor |
filteredTap |
protected org.apache.commons.logging.Log |
logger |
protected MessageProcessor |
tap |
flowConstruct, messagingExceptionHandler, muleContextPHASE_NAMEPHASE_NAMEPHASE_NAMEPHASE_NAMEPROPERTY_NAME| Constructor and Description |
|---|
WireTap() |
| Modifier and Type | Method and Description |
|---|---|
Filter |
getFilter() |
protected List<MessageProcessor> |
getOwnedMessageProcessors() |
MessageProcessor |
getTap() |
MuleEvent |
process(MuleEvent event)
Invokes the MessageProcessor.
|
void |
setFilter(Filter filter) |
void |
setMessageProcessor(MessageProcessor tap)
Deprecated.
|
void |
setTap(MessageProcessor tap) |
String |
toString() |
addMessageProcessorPathElements, getAnnotation, getAnnotations, getOwnedObjects, setAnnotationsdispose, getFlowConstruct, getMessagingExceptionHandler, getMuleContext, initialise, setFlowConstruct, setMessagingExceptionHandler, setMuleContext, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitinitialisedisposesetMuleContextsetFlowConstructprotected final transient org.apache.commons.logging.Log logger
protected volatile MessageProcessor tap
protected volatile Filter filter
protected MessageProcessor filteredTap
public MuleEvent process(MuleEvent event) throws MuleException
MessageProcessorprocess in interface MessageProcessorevent - MuleEvent to be processedMuleExceptionpublic MessageProcessor getTap()
public void setTap(MessageProcessor tap)
@Deprecated public void setMessageProcessor(MessageProcessor tap)
public Filter getFilter()
public void setFilter(Filter filter)
protected List<MessageProcessor> getOwnedMessageProcessors()
getOwnedMessageProcessors in class AbstractMessageProcessorOwnerCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.