org.apache.camel.processor.interceptor
Class Debugger

java.lang.Object
  extended by org.apache.camel.processor.interceptor.Debugger
All Implemented Interfaces:
InterceptStrategy

public class Debugger
extends Object
implements InterceptStrategy

An interceptor strategy for debugging and tracing routes

Version:
$Revision: 975 $

Constructor Summary
Debugger()
           
 
Method Summary
protected  List<ExceptionEvent> createExceptionsList()
           
protected  List<Exchange> createExchangeList()
           
 Breakpoint getBreakpoint(String id)
          Returns the breakpoint object for the given node in the DSL
static Debugger getDebugger(CamelContext context)
          A helper method to return the debugger instance for a given CamelContext if one is enabled
 List<Exchange> getExchanges(String id)
          Returns the list of exchanges sent to the given node in the DSL
 DebugInterceptor getInterceptor(String id)
           
 TraceFormatter getTraceFormatter()
           
 boolean isEnabled()
           
 void setEnable(boolean flag)
           
 void setLogExchanges(boolean flag)
           
 void setTraceFormatter(TraceFormatter formatter)
           
 Processor wrapProcessorInInterceptors(ProcessorType processorType, Processor target)
          This method is invoked by ProcessorType.wrapProcessor(RouteContext, Processor) to give the implementor an opportunity to wrap the target processor in a route.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Debugger

public Debugger()
Method Detail

getDebugger

public static Debugger getDebugger(CamelContext context)
A helper method to return the debugger instance for a given CamelContext if one is enabled

Parameters:
context - the camel context the debugger is connected to
Returns:
the debugger or null if none can be found

getInterceptor

public DebugInterceptor getInterceptor(String id)

getExchanges

public List<Exchange> getExchanges(String id)
Returns the list of exchanges sent to the given node in the DSL


setEnable

public void setEnable(boolean flag)

isEnabled

public boolean isEnabled()

getBreakpoint

public Breakpoint getBreakpoint(String id)
Returns the breakpoint object for the given node in the DSL


getTraceFormatter

public TraceFormatter getTraceFormatter()

setTraceFormatter

public void setTraceFormatter(TraceFormatter formatter)

setLogExchanges

public void setLogExchanges(boolean flag)

wrapProcessorInInterceptors

public Processor wrapProcessorInInterceptors(ProcessorType processorType,
                                             Processor target)
                                      throws Exception
Description copied from interface: InterceptStrategy
This method is invoked by ProcessorType.wrapProcessor(RouteContext, Processor) to give the implementor an opportunity to wrap the target processor in a route.

Specified by:
wrapProcessorInInterceptors in interface InterceptStrategy
Parameters:
processorType - the object that invokes this method
target - the processor to be wrapped
Returns:
processor wrapped with an interceptor or not wrapped
Throws:
Exception - can be thrown

createExchangeList

protected List<Exchange> createExchangeList()

createExceptionsList

protected List<ExceptionEvent> createExceptionsList()


Copyright © 2009 IONA Open Source Community. All Rights Reserved.