org.apache.camel.processor.interceptor
Interface TraceEventHandler

All Known Implementing Classes:
DefaultTraceEventHandler, JMXNotificationTraceEventHandler

public interface TraceEventHandler

A handler which reacts on trace events.


Method Summary
 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.

 

Method Detail

traceExchange

void traceExchange(ProcessorDefinition<?> node,
                   Processor target,
                   TraceInterceptor traceInterceptor,
                   Exchange exchange)
                   throws Exception
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.

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

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

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

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

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

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

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


Apache CAMEL