org.apache.camel.processor.interceptor
Class DefaultTraceEventHandler

java.lang.Object
  extended by org.apache.camel.processor.interceptor.DefaultTraceEventHandler
All Implemented Interfaces:
TraceEventHandler, Service

public class DefaultTraceEventHandler
extends Object
implements TraceEventHandler, Service


Constructor Summary
DefaultTraceEventHandler(Tracer tracer)
           
 
Method Summary
 void start()
          Starts the service
 void stop()
          Stops the service
 void traceExchange(ProcessorDefinition<?> node, Processor target, TraceInterceptor traceInterceptor, Exchange exchange)
          Event called when an Exchange is about to be processed

This event is only called if trace out has been disabled (which it is by default).

 Object traceExchangeIn(ProcessorDefinition<?> node, Processor target, TraceInterceptor traceInterceptor, Exchange exchange)
          Event called when an Exchange is about to be processed (in)

This event is only called if trace out has been enabled.

 void traceExchangeOut(ProcessorDefinition<?> node, Processor target, TraceInterceptor traceInterceptor, Exchange exchange, Object traceState)
          Event called when an Exchange has been processed (out)

This event is only called if trace out has been enabled.

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTraceEventHandler

public DefaultTraceEventHandler(Tracer tracer)
Method Detail

traceExchange

public void traceExchange(ProcessorDefinition<?> node,
                          Processor target,
                          TraceInterceptor traceInterceptor,
                          Exchange exchange)
                   throws Exception
Description copied from interface: TraceEventHandler
Event called when an Exchange is about to be processed

This event is only called if trace out has been disabled (which it is by default).

This method is for coarse grained tracing, where as the the other two methods is for fine grained with in and event events.

Specified by:
traceExchange in interface TraceEventHandler
Parameters:
node - the current node
target - the current processor being invoked
traceInterceptor - the trace interceptor
exchange - the current exchange
Throws:
Exception - is thrown if an error occurred during tracing

traceExchangeIn

public Object traceExchangeIn(ProcessorDefinition<?> node,
                              Processor target,
                              TraceInterceptor traceInterceptor,
                              Exchange exchange)
                       throws Exception
Description copied from interface: TraceEventHandler
Event called when an Exchange is about to be processed (in)

This event is only called if trace out has been enabled.

Specified by:
traceExchangeIn in interface TraceEventHandler
Parameters:
node - the current node
target - the current processor being invoked
traceInterceptor - the trace interceptor
exchange - the current exchange
Returns:
an optional return object to pass in the traceEventOut method.
Throws:
Exception - is thrown if an error occurred during tracing

traceExchangeOut

public void traceExchangeOut(ProcessorDefinition<?> node,
                             Processor target,
                             TraceInterceptor traceInterceptor,
                             Exchange exchange,
                             Object traceState)
                      throws Exception
Description copied from interface: TraceEventHandler
Event called when an Exchange has been processed (out)

This event is only called if trace out has been enabled.

Specified by:
traceExchangeOut in interface TraceEventHandler
Parameters:
node - the current node
target - the current processor being invoked
traceInterceptor - the trace interceptor
exchange - the current exchange (contains exception if the processing failed with an exception)
traceState - the optional object which was returned from the traceEventIn method.
Throws:
Exception - is thrown if an error occurred during tracing

start

public void start()
           throws Exception
Description copied from interface: Service
Starts the service

Specified by:
start in interface Service
Throws:
Exception - is thrown if starting failed

stop

public void stop()
          throws Exception
Description copied from interface: Service
Stops the service

Specified by:
stop in interface Service
Throws:
Exception - is thrown if stopping failed


Apache CAMEL