org.apache.camel.processor.interceptor
Class TraceInterceptor
java.lang.Object
org.apache.camel.impl.ServiceSupport
org.apache.camel.processor.DelegateProcessor
org.apache.camel.processor.interceptor.TraceInterceptor
- All Implemented Interfaces:
- Processor, ExchangeFormatter, Service
public class TraceInterceptor
- extends DelegateProcessor
- implements ExchangeFormatter
An interceptor for debugging and tracing routes
- Version:
- $Revision: 45325 $
Methods inherited from class org.apache.camel.impl.ServiceSupport |
addChildService, getThreadName, isRunAllowed, isStarted, isStarting, isStopped, isStopping, nextThreadCounter, removeChildService, start, stop |
TraceInterceptor
public TraceInterceptor(ProcessorType node,
Processor target,
TraceFormatter formatter,
Tracer tracer)
TraceInterceptor
public TraceInterceptor(ProcessorType node,
Processor target,
TraceFormatter formatter)
TraceInterceptor
public TraceInterceptor(ProcessorType node,
Processor target,
Tracer tracer)
toString
public String toString()
- Overrides:
toString
in class DelegateProcessor
process
public void process(Exchange exchange)
throws Exception
- Description copied from interface:
Processor
- Processes the message exchange
- Specified by:
process
in interface Processor
- Overrides:
process
in class DelegateProcessor
- Throws:
Exception
- if an internal processing error has occurred.
format
public Object format(Exchange exchange)
- Description copied from interface:
ExchangeFormatter
- Generates a string representation of the exchange
- Specified by:
format
in interface ExchangeFormatter
getNode
public ProcessorType getNode()
getTraceFilter
public Predicate getTraceFilter()
setTraceFilter
public void setTraceFilter(Predicate traceFilter)
isTraceExceptions
public boolean isTraceExceptions()
setTraceExceptions
public void setTraceExceptions(boolean traceExceptions)
getLogger
public Logger getLogger()
getFormatter
public TraceFormatter getFormatter()
setFormatter
public void setFormatter(TraceFormatter formatter)
getLevel
public LoggingLevel getLevel()
getLog
public org.apache.commons.logging.Log getLog()
setLog
public void setLog(org.apache.commons.logging.Log log)
setLevel
public void setLevel(LoggingLevel level)
logExchange
protected void logExchange(Exchange exchange)
logException
protected void logException(Exchange exchange,
Throwable throwable)
shouldLogExchange
protected boolean shouldLogExchange(Exchange exchange)
- Returns true if the given exchange should be logged in the trace list
Copyright © 2008 IONA Open Source Community. All Rights Reserved.