Package org.apache.camel.spi
Interface Debugger
- All Superinterfaces:
AutoCloseable,CamelContextAware,HasCamelContext,Service
A debugger which allows tooling to attach breakpoints which is being invoked when
Exchanges is being routed.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidActivate all breakpoints.voidaddBreakpoint(Breakpoint breakpoint) Add the given breakpointvoidaddBreakpoint(Breakpoint breakpoint, Condition... conditions) Add the given breakpointvoidaddSingleStepBreakpoint(Breakpoint breakpoint) Add the given breakpoint which will be used in single step modevoidaddSingleStepBreakpoint(Breakpoint breakpoint, Condition... conditions) Add the given breakpoint which will be used in single step modebooleanafterProcess(Exchange exchange, Processor processor, NamedNode definition, long timeTaken) Callback invoked when anExchangehas been processed which allows implementators to notify breakpoints.booleanbeforeProcess(Exchange exchange, Processor processor, NamedNode definition) Callback invoked when anExchangeis about to be processed which allows implementators to notify breakpoints.Gets a list of all the breakpointsbooleanonEvent(Exchange exchange, CamelEvent.ExchangeEvent event) Callback invoked when anExchangeis being processed which allows implementators to notify breakpoints.voidremoveBreakpoint(Breakpoint breakpoint) Removes the given breakpointbooleanstartSingleStepExchange(String exchangeId, Breakpoint breakpoint) Starts the single step debug mode for the given exchangevoidstopSingleStepExchange(String exchangeId) Stops the single step debug mode for the given exchange.voidSuspends all breakpoints.Methods inherited from interface org.apache.camel.CamelContextAware
setCamelContextMethods inherited from interface org.apache.camel.spi.HasCamelContext
getCamelContext
-
Field Details
-
FACTORY
- See Also:
-
-
Method Details
-
addBreakpoint
Add the given breakpoint- Parameters:
breakpoint- the breakpoint
-
addBreakpoint
Add the given breakpoint- Parameters:
breakpoint- the breakpointconditions- a number ofConditions
-
addSingleStepBreakpoint
Add the given breakpoint which will be used in single step mode The debugger will single step the first message arriving.- Parameters:
breakpoint- the breakpoint
-
addSingleStepBreakpoint
Add the given breakpoint which will be used in single step mode The debugger will single step the first message arriving.- Parameters:
breakpoint- the breakpointconditions- a number ofConditions
-
removeBreakpoint
Removes the given breakpoint- Parameters:
breakpoint- the breakpoint
-
suspendAllBreakpoints
void suspendAllBreakpoints()Suspends all breakpoints. -
activateAllBreakpoints
void activateAllBreakpoints()Activate all breakpoints. -
getBreakpoints
List<Breakpoint> getBreakpoints()Gets a list of all the breakpoints- Returns:
- the breakpoints wrapped in an unmodifiable list, is never null.
-
startSingleStepExchange
Starts the single step debug mode for the given exchange- Parameters:
exchangeId- the exchange idbreakpoint- the breakpoint- Returns:
- true if the debugger will single step the given exchange, false if the debugger is already single stepping another, and thus cannot simultaneously single step another exchange
-
stopSingleStepExchange
Stops the single step debug mode for the given exchange. Notice: The default implementation of the debugger is capable of auto stopping when the exchange is complete.- Parameters:
exchangeId- the exchange id
-
beforeProcess
Callback invoked when anExchangeis about to be processed which allows implementators to notify breakpoints.- Parameters:
exchange- the exchangeprocessor- theProcessorabout to be processeddefinition- the definition of the processor- Returns:
- true if any breakpoint was hit, false if not breakpoint was hit
-
afterProcess
Callback invoked when anExchangehas been processed which allows implementators to notify breakpoints.- Parameters:
exchange- the exchangeprocessor- theProcessorwhich was processeddefinition- the definition of the processortimeTaken- time in millis it took to process theExchange- time spend in breakpoint callbacks may affect this time- Returns:
- true if any breakpoint was hit, false if not breakpoint was hit
-
onEvent
Callback invoked when anExchangeis being processed which allows implementators to notify breakpoints.- Parameters:
exchange- the exchangeevent- the event (instance ofCamelEvent.ExchangeEvent- Returns:
- true if any breakpoint was hit, false if not breakpoint was hit
-