Interface Breakpoint
public interface Breakpoint
Callback interface for a debugger breakpoint, registered with the
Debugger and invoked as
Exchanges pass through route nodes.
Breakpoints are registered via Debugger.addBreakpoint(Breakpoint) (unconditional) or
Debugger.addBreakpoint(Breakpoint, Condition...) (conditional). When all provided Conditions are
satisfied, the Debugger calls the appropriate before* / after* callback on this interface.
Multiple before* methods exist to differentiate the type of routing event: entering a processor node,
handling an exchange event, and so on.
Exceptions thrown from any callback method are caught by the Debugger and logged at WARN level. This
ensures that a buggy breakpoint does not abort routing of the exchange.
A breakpoint can be in Breakpoint.State.Active or Breakpoint.State.Suspended state. The BacklogDebugger uses the
suspended state to pause exchange processing and wait for a resume signal from a debugging client.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumState of the breakpoint as either active or suspended. -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()Activates this breakpointvoidafterProcess(Exchange exchange, Processor processor, NamedNode definition, long timeTaken) Callback invoked when the breakpoint was hit and theExchangehas been processed (after).voidbeforeProcess(Exchange exchange, Processor processor, NamedNode definition) Callback invoked when the breakpoint was hit and theExchangeis about to be processed (before).getState()Gets the state of this breakvoidonEvent(Exchange exchange, CamelEvent.ExchangeEvent event, @Nullable NamedNode definition) voidsuspend()Suspend this breakpoint
-
Method Details
-
getState
-
suspend
void suspend()Suspend this breakpoint -
activate
void activate()Activates this breakpoint -
beforeProcess
Callback invoked when the breakpoint was hit and theExchangeis about to be processed (before). -
afterProcess
Callback invoked when the breakpoint was hit and theExchangehas been processed (after). -
onEvent
- Parameters:
exchange- theExchangeevent- the event (instance ofCamelEvent.ExchangeEventdefinition- theNamedNodedefinition of the last processor executed, may be null if not possible to resolve from tracing- See Also:
-