org.mule.routing
Class WireTap

java.lang.Object
  extended by org.mule.processor.AbstractMuleObjectOwner<MessageProcessor>
      extended by org.mule.processor.AbstractMessageProcessorOwner
          extended by org.mule.routing.WireTap
All Implemented Interfaces:
AnnotatedObject, FlowConstructAware, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, MessageProcessor

public class WireTap
extends AbstractMessageProcessorOwner
implements MessageProcessor

The 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


Field Summary
protected  Filter filter
           
protected  MessageProcessor filteredTap
           
protected  Log logger
           
protected  MessageProcessor tap
           
 
Fields inherited from class org.mule.processor.AbstractMuleObjectOwner
flowConstruct, muleContext
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Stoppable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Fields inherited from interface org.mule.api.AnnotatedObject
PROPERTY_NAME
 
Constructor Summary
WireTap()
           
 
Method Summary
 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()
           
 
Methods inherited from class org.mule.processor.AbstractMessageProcessorOwner
getAnnotation, getAnnotations, getOwnedObjects, setAnnotations
 
Methods inherited from class org.mule.processor.AbstractMuleObjectOwner
dispose, getFlowConstruct, getMuleContext, initialise, setFlowConstruct, setMuleContext, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mule.api.lifecycle.Initialisable
initialise
 
Methods inherited from interface org.mule.api.lifecycle.Startable
start
 
Methods inherited from interface org.mule.api.lifecycle.Stoppable
stop
 
Methods inherited from interface org.mule.api.lifecycle.Disposable
dispose
 
Methods inherited from interface org.mule.api.context.MuleContextAware
setMuleContext
 
Methods inherited from interface org.mule.api.construct.FlowConstructAware
setFlowConstruct
 

Field Detail

logger

protected final transient Log logger

tap

protected volatile MessageProcessor tap

filter

protected volatile Filter filter

filteredTap

protected MessageProcessor filteredTap
Constructor Detail

WireTap

public WireTap()
Method Detail

process

public MuleEvent process(MuleEvent event)
                  throws MuleException
Description copied from interface: MessageProcessor
Invokes the MessageProcessor.

Specified by:
process in interface MessageProcessor
Parameters:
event - MuleEvent to be processed
Returns:
optional response MuleEvent
Throws:
MuleException

getTap

public MessageProcessor getTap()

setTap

public void setTap(MessageProcessor tap)

setMessageProcessor

@Deprecated
public void setMessageProcessor(MessageProcessor tap)
Deprecated. 


getFilter

public Filter getFilter()

setFilter

public void setFilter(Filter filter)

toString

public String toString()
Overrides:
toString in class Object

getOwnedMessageProcessors

protected List<MessageProcessor> getOwnedMessageProcessors()
Specified by:
getOwnedMessageProcessors in class AbstractMessageProcessorOwner


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.