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 |
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 |
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()
CamelContextAware
CamelContext
getCamelContext
in interface CamelContextAware
public void setCamelContext(CamelContext camelContext)
CamelContextAware
CamelContext
setCamelContext
in interface CamelContextAware
camelContext
- the Camel contextpublic void addBreakpoint(Breakpoint breakpoint)
Debugger
addBreakpoint
in interface Debugger
breakpoint
- the breakpointpublic void addBreakpoint(Breakpoint breakpoint, Condition... conditions)
Debugger
addBreakpoint
in interface Debugger
breakpoint
- the breakpointconditions
- a number of Condition
spublic void addSingleStepBreakpoint(Breakpoint breakpoint)
Debugger
addSingleStepBreakpoint
in interface Debugger
breakpoint
- the breakpointpublic void addSingleStepBreakpoint(Breakpoint breakpoint, Condition... conditions)
Debugger
addSingleStepBreakpoint
in interface Debugger
breakpoint
- the breakpointconditions
- a number of Condition
spublic void removeBreakpoint(Breakpoint breakpoint)
Debugger
removeBreakpoint
in interface Debugger
breakpoint
- the breakpointpublic void suspendAllBreakpoints()
Debugger
suspendAllBreakpoints
in interface Debugger
public void activateAllBreakpoints()
Debugger
activateAllBreakpoints
in interface Debugger
public List<Breakpoint> getBreakpoints()
Debugger
getBreakpoints
in interface Debugger
public boolean startSingleStepExchange(String exchangeId, Breakpoint breakpoint)
Debugger
startSingleStepExchange
in interface Debugger
exchangeId
- the exchange idbreakpoint
- the breakpointpublic void stopSingleStepExchange(String exchangeId)
Debugger
stopSingleStepExchange
in interface Debugger
exchangeId
- the exchange idpublic boolean beforeProcess(Exchange exchange, Processor processor, ProcessorDefinition<?> definition)
Debugger
Exchange
is about to be processed which allows implementators
to notify breakpoints.beforeProcess
in interface Debugger
exchange
- the exchangeprocessor
- the Processor
about to be processeddefinition
- the definition of the processorpublic boolean afterProcess(Exchange exchange, Processor processor, ProcessorDefinition<?> definition, long timeTaken)
Debugger
Exchange
has been processed which allows implementators
to notify breakpoints.afterProcess
in interface Debugger
exchange
- 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)
Debugger
Exchange
is being processed which allows implementators
to notify breakpoints.onEvent
in interface Debugger
exchange
- the exchangeevent
- the event (instance of AbstractExchangeEvent
protected 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
Service
public void stop() throws Exception
Service
Apache Camel