public class DefaultDebugger extends Object implements Debugger, CamelContextAware
Debugger.| Constructor and Description |
|---|
DefaultDebugger() |
DefaultDebugger(CamelContext camelContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
activateAllBreakpoints()
Activate all breakpoints.
|
void |
addBreakpoint(Breakpoint breakpoint)
Add the given breakpoint
|
void |
addBreakpoint(Breakpoint breakpoint,
Condition... conditions)
Add the given breakpoint
|
void |
addSingleStepBreakpoint(Breakpoint breakpoint)
Add the given breakpoint which will be used in single step mode
The debugger will single step the first message arriving.
|
void |
addSingleStepBreakpoint(Breakpoint breakpoint,
Condition... conditions)
Add the given breakpoint which will be used in single step mode
The debugger will single step the first message arriving.
|
boolean |
afterProcess(Exchange exchange,
Processor processor,
ProcessorDefinition<?> definition,
long timeTaken)
Callback invoked when an
Exchange has been processed which allows implementators
to notify breakpoints. |
boolean |
beforeProcess(Exchange exchange,
Processor processor,
ProcessorDefinition<?> definition)
Callback invoked when an
Exchange is about to be processed which allows implementators
to notify breakpoints. |
List<Breakpoint> |
getBreakpoints()
Gets a list of all the breakpoints
|
CamelContext |
getCamelContext()
Get the
CamelContext |
boolean |
isUseTracer() |
protected void |
onAfterProcess(Exchange exchange,
Processor processor,
ProcessorDefinition<?> definition,
long timeTaken,
Breakpoint breakpoint) |
protected void |
onBeforeProcess(Exchange exchange,
Processor processor,
ProcessorDefinition<?> definition,
Breakpoint breakpoint) |
boolean |
onEvent(Exchange exchange,
EventObject event)
Callback invoked when an
Exchange is being processed which allows implementators
to notify breakpoints. |
protected void |
onEvent(Exchange exchange,
EventObject event,
Breakpoint breakpoint) |
void |
removeBreakpoint(Breakpoint breakpoint)
Removes the given breakpoint
|
void |
setCamelContext(CamelContext camelContext)
Injects the
CamelContext |
void |
setUseTracer(boolean useTracer) |
void |
start()
Starts the service
|
boolean |
startSingleStepExchange(String exchangeId,
Breakpoint breakpoint)
Starts the single step debug mode for the given exchange
|
void |
stop()
Stops the service
|
void |
stopSingleStepExchange(String exchangeId)
Stops the single step debug mode for the given exchange.
|
void |
suspendAllBreakpoints()
Suspends all breakpoints.
|
String |
toString() |
public DefaultDebugger()
public DefaultDebugger(CamelContext camelContext)
public CamelContext getCamelContext()
CamelContextAwareCamelContextgetCamelContext in interface CamelContextAwarepublic void setCamelContext(CamelContext camelContext)
CamelContextAwareCamelContextsetCamelContext in interface CamelContextAwarecamelContext - the Camel contextpublic boolean isUseTracer()
public void setUseTracer(boolean useTracer)
public void addBreakpoint(Breakpoint breakpoint)
DebuggeraddBreakpoint in interface Debuggerbreakpoint - the breakpointpublic void addBreakpoint(Breakpoint breakpoint, Condition... conditions)
DebuggeraddBreakpoint in interface Debuggerbreakpoint - the breakpointconditions - a number of Conditionspublic void addSingleStepBreakpoint(Breakpoint breakpoint)
DebuggeraddSingleStepBreakpoint in interface Debuggerbreakpoint - the breakpointpublic void addSingleStepBreakpoint(Breakpoint breakpoint, Condition... conditions)
DebuggeraddSingleStepBreakpoint in interface Debuggerbreakpoint - the breakpointconditions - a number of Conditionspublic void removeBreakpoint(Breakpoint breakpoint)
DebuggerremoveBreakpoint in interface Debuggerbreakpoint - the breakpointpublic void suspendAllBreakpoints()
DebuggersuspendAllBreakpoints in interface Debuggerpublic void activateAllBreakpoints()
DebuggeractivateAllBreakpoints in interface Debuggerpublic List<Breakpoint> getBreakpoints()
DebuggergetBreakpoints in interface Debuggerpublic boolean startSingleStepExchange(String exchangeId, Breakpoint breakpoint)
DebuggerstartSingleStepExchange in interface DebuggerexchangeId - the exchange idbreakpoint - the breakpointpublic void stopSingleStepExchange(String exchangeId)
DebuggerstopSingleStepExchange in interface DebuggerexchangeId - the exchange idpublic boolean beforeProcess(Exchange exchange, Processor processor, ProcessorDefinition<?> definition)
DebuggerExchange is about to be processed which allows implementators
to notify breakpoints.beforeProcess in interface Debuggerexchange - the exchangeprocessor - the Processor about to be processeddefinition - the definition of the processorpublic boolean afterProcess(Exchange exchange, Processor processor, ProcessorDefinition<?> definition, long timeTaken)
DebuggerExchange has been processed which allows implementators
to notify breakpoints.afterProcess in interface Debuggerexchange - the exchangeprocessor - the Processor which was processeddefinition - the definition of the processortimeTaken - time in millis it took to process the Exchange - time spend in breakpoint callbacks may affect this timepublic boolean onEvent(Exchange exchange, EventObject event)
DebuggerExchange is being processed which allows implementators
to notify breakpoints.onEvent in interface Debuggerexchange - the exchangeevent - the event (instance of AbstractExchangeEventprotected void onBeforeProcess(Exchange exchange, Processor processor, ProcessorDefinition<?> definition, Breakpoint breakpoint)
protected void onAfterProcess(Exchange exchange, Processor processor, ProcessorDefinition<?> definition, long timeTaken, Breakpoint breakpoint)
protected void onEvent(Exchange exchange, EventObject event, Breakpoint breakpoint)
public void start() throws Exception
Servicepublic void stop() throws Exception
ServiceApache Camel