Package org.apache.camel.impl.debugger
Class DefaultBacklogDebugger
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.impl.debugger.DefaultBacklogDebugger
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.BacklogDebugger,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
public final class DefaultBacklogDebugger
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.spi.BacklogDebugger
-
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDINGFields inherited from interface org.apache.camel.spi.BacklogDebugger
BREAKPOINT_ALL_ROUTES, SUSPEND_MODE_ENV_VAR_NAME, SUSPEND_MODE_SYSTEM_PROP_NAME -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBreakpoint(String nodeId) voidaddConditionalBreakpoint(String nodeId, String language, String predicate) voidafterProcess(org.apache.camel.Exchange exchange, org.apache.camel.Processor processor, org.apache.camel.NamedNode definition, long timeTaken) voidattach()org.apache.camel.util.StopWatchbeforeProcess(org.apache.camel.Exchange exchange, org.apache.camel.Processor processor, org.apache.camel.NamedNode definition) static org.apache.camel.spi.BacklogDebuggercreateDebugger(org.apache.camel.CamelContext context) Creates a new backlog debugger.voiddetach()voiddisableBreakpoint(String nodeId) voidprotected voiddoStart()protected voiddoStop()dumpTracedMessagesAsJSon(String nodeId) dumpTracedMessagesAsXml(String nodeId) voidenableBreakpoint(String nodeId) voidstatic org.apache.camel.spi.BacklogDebuggergetBacklogDebugger(org.apache.camel.CamelContext context) A helper method to return the BacklogDebugger instance if one is enabledintlonglongorg.apache.camel.spi.BacklogTracerEventMessageorg.apache.camel.ExchangebooleanhasBreakpoint(String nodeId) booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidvoidremoveBreakpoint(String nodeId) voidremoveExchangePropertyOnBreakpoint(String nodeId, String exchangePropertyName) voidremoveExchangeVariableOnBreakpoint(String nodeId, String variableName) voidremoveMessageBodyOnBreakpoint(String nodeId) voidremoveMessageHeaderOnBreakpoint(String nodeId, String headerName) voidvoidvoidresumeBreakpoint(String nodeId) voidresumeBreakpoint(String nodeId, boolean stepMode) voidsetBodyIncludeFiles(boolean bodyIncludeFiles) voidsetBodyIncludeStreams(boolean bodyIncludeStreams) voidsetBodyMaxChars(int bodyMaxChars) voidsetEnabled(boolean enabled) voidsetExchangePropertyOnBreakpoint(String nodeId, String exchangePropertyName, Object value) voidsetExchangePropertyOnBreakpoint(String nodeId, String exchangePropertyName, Object value, Class<?> type) voidsetExchangeVariableOnBreakpoint(String nodeId, String variableName, Object value) voidsetExchangeVariableOnBreakpoint(String nodeId, String variableName, Object value, Class<?> type) voidsetFallbackTimeout(long fallbackTimeout) voidsetIncludeException(boolean includeException) voidsetIncludeExchangeProperties(boolean includeExchangeProperties) voidsetIncludeExchangeVariables(boolean includeExchangeVariables) voidsetInitialBreakpoints(String initialBreakpoints) voidsetLoggingLevel(String level) voidsetMessageBodyOnBreakpoint(String nodeId, Object body) voidsetMessageBodyOnBreakpoint(String nodeId, Object body, Class<?> type) voidsetMessageHeaderOnBreakpoint(String nodeId, String headerName, Object value) voidsetMessageHeaderOnBreakpoint(String nodeId, String headerName, Object value, Class<?> type) voidsetSingleStepIncludeStartEnd(boolean singleStepIncludeStartEnd) voidsetStandby(boolean standby) voidsetSuspendMode(boolean suspendMode) voidskipOver()voidstep()voidvoidstepBreakpoint(String nodeId) voidstepOver()Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Method Details
-
createDebugger
public static org.apache.camel.spi.BacklogDebugger createDebugger(org.apache.camel.CamelContext context) Creates a new backlog debugger.In case the environment variable
BacklogDebugger.SUSPEND_MODE_ENV_VAR_NAMEor the system propertyBacklogDebugger.SUSPEND_MODE_SYSTEM_PROP_NAMEhas been set totrue, the message processing is directly suspended.- Parameters:
context- Camel context- Returns:
- a new backlog debugger
-
getBacklogDebugger
public static org.apache.camel.spi.BacklogDebugger getBacklogDebugger(org.apache.camel.CamelContext context) A helper method to return the BacklogDebugger instance if one is enabled- Returns:
- the backlog debugger or null if none can be found
-
getInitialBreakpoints
- Specified by:
getInitialBreakpointsin interfaceorg.apache.camel.spi.BacklogDebugger
-
setInitialBreakpoints
- Specified by:
setInitialBreakpointsin interfaceorg.apache.camel.spi.BacklogDebugger
-
getLoggingLevel
- Specified by:
getLoggingLevelin interfaceorg.apache.camel.spi.BacklogDebugger
-
setLoggingLevel
- Specified by:
setLoggingLevelin interfaceorg.apache.camel.spi.BacklogDebugger
-
enableDebugger
public void enableDebugger()- Specified by:
enableDebuggerin interfaceorg.apache.camel.spi.BacklogDebugger
-
disableDebugger
public void disableDebugger()- Specified by:
disableDebuggerin interfaceorg.apache.camel.spi.BacklogDebugger
-
setEnabled
public void setEnabled(boolean enabled) - Specified by:
setEnabledin interfaceorg.apache.camel.spi.BacklogDebugger
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceorg.apache.camel.spi.BacklogDebugger
-
isStandby
public boolean isStandby()- Specified by:
isStandbyin interfaceorg.apache.camel.spi.BacklogDebugger
-
setStandby
public void setStandby(boolean standby) - Specified by:
setStandbyin interfaceorg.apache.camel.spi.BacklogDebugger
-
hasBreakpoint
- Specified by:
hasBreakpointin interfaceorg.apache.camel.spi.BacklogDebugger
-
setSuspendMode
public void setSuspendMode(boolean suspendMode) - Specified by:
setSuspendModein interfaceorg.apache.camel.spi.BacklogDebugger
-
isSuspendMode
public boolean isSuspendMode()- Specified by:
isSuspendModein interfaceorg.apache.camel.spi.BacklogDebugger
-
isSingleStepMode
public boolean isSingleStepMode()- Specified by:
isSingleStepModein interfaceorg.apache.camel.spi.BacklogDebugger
-
attach
public void attach()- Specified by:
attachin interfaceorg.apache.camel.spi.BacklogDebugger
-
detach
public void detach()- Specified by:
detachin interfaceorg.apache.camel.spi.BacklogDebugger
-
addBreakpoint
- Specified by:
addBreakpointin interfaceorg.apache.camel.spi.BacklogDebugger
-
addConditionalBreakpoint
- Specified by:
addConditionalBreakpointin interfaceorg.apache.camel.spi.BacklogDebugger
-
removeBreakpoint
- Specified by:
removeBreakpointin interfaceorg.apache.camel.spi.BacklogDebugger
-
removeAllBreakpoints
public void removeAllBreakpoints()- Specified by:
removeAllBreakpointsin interfaceorg.apache.camel.spi.BacklogDebugger
-
getBreakpoints
- Specified by:
getBreakpointsin interfaceorg.apache.camel.spi.BacklogDebugger
-
resumeBreakpoint
- Specified by:
resumeBreakpointin interfaceorg.apache.camel.spi.BacklogDebugger
-
resumeBreakpoint
- Specified by:
resumeBreakpointin interfaceorg.apache.camel.spi.BacklogDebugger
-
setMessageBodyOnBreakpoint
- Specified by:
setMessageBodyOnBreakpointin interfaceorg.apache.camel.spi.BacklogDebugger
-
setMessageBodyOnBreakpoint
- Specified by:
setMessageBodyOnBreakpointin interfaceorg.apache.camel.spi.BacklogDebugger
-
removeMessageBodyOnBreakpoint
- Specified by:
removeMessageBodyOnBreakpointin interfaceorg.apache.camel.spi.BacklogDebugger
-
setMessageHeaderOnBreakpoint
public void setMessageHeaderOnBreakpoint(String nodeId, String headerName, Object value) throws org.apache.camel.NoTypeConversionAvailableException - Specified by:
setMessageHeaderOnBreakpointin interfaceorg.apache.camel.spi.BacklogDebugger- Throws:
org.apache.camel.NoTypeConversionAvailableException
-
setMessageHeaderOnBreakpoint
public void setMessageHeaderOnBreakpoint(String nodeId, String headerName, Object value, Class<?> type) throws org.apache.camel.NoTypeConversionAvailableException - Specified by:
setMessageHeaderOnBreakpointin interfaceorg.apache.camel.spi.BacklogDebugger- Throws:
org.apache.camel.NoTypeConversionAvailableException
-
setExchangePropertyOnBreakpoint
public void setExchangePropertyOnBreakpoint(String nodeId, String exchangePropertyName, Object value) throws org.apache.camel.NoTypeConversionAvailableException - Specified by:
setExchangePropertyOnBreakpointin interfaceorg.apache.camel.spi.BacklogDebugger- Throws:
org.apache.camel.NoTypeConversionAvailableException
-
setExchangePropertyOnBreakpoint
public void setExchangePropertyOnBreakpoint(String nodeId, String exchangePropertyName, Object value, Class<?> type) throws org.apache.camel.NoTypeConversionAvailableException - Specified by:
setExchangePropertyOnBreakpointin interfaceorg.apache.camel.spi.BacklogDebugger- Throws:
org.apache.camel.NoTypeConversionAvailableException
-
removeExchangePropertyOnBreakpoint
- Specified by:
removeExchangePropertyOnBreakpointin interfaceorg.apache.camel.spi.BacklogDebugger
-
setExchangeVariableOnBreakpoint
public void setExchangeVariableOnBreakpoint(String nodeId, String variableName, Object value) throws org.apache.camel.NoTypeConversionAvailableException - Specified by:
setExchangeVariableOnBreakpointin interfaceorg.apache.camel.spi.BacklogDebugger- Throws:
org.apache.camel.NoTypeConversionAvailableException
-
setExchangeVariableOnBreakpoint
public void setExchangeVariableOnBreakpoint(String nodeId, String variableName, Object value, Class<?> type) throws org.apache.camel.NoTypeConversionAvailableException - Specified by:
setExchangeVariableOnBreakpointin interfaceorg.apache.camel.spi.BacklogDebugger- Throws:
org.apache.camel.NoTypeConversionAvailableException
-
removeExchangeVariableOnBreakpoint
- Specified by:
removeExchangeVariableOnBreakpointin interfaceorg.apache.camel.spi.BacklogDebugger
-
getFallbackTimeout
public long getFallbackTimeout()- Specified by:
getFallbackTimeoutin interfaceorg.apache.camel.spi.BacklogDebugger
-
setFallbackTimeout
public void setFallbackTimeout(long fallbackTimeout) - Specified by:
setFallbackTimeoutin interfaceorg.apache.camel.spi.BacklogDebugger
-
removeMessageHeaderOnBreakpoint
- Specified by:
removeMessageHeaderOnBreakpointin interfaceorg.apache.camel.spi.BacklogDebugger
-
resumeAll
public void resumeAll()- Specified by:
resumeAllin interfaceorg.apache.camel.spi.BacklogDebugger
-
stepBreakpoint
public void stepBreakpoint()- Specified by:
stepBreakpointin interfaceorg.apache.camel.spi.BacklogDebugger
-
stepBreakpoint
- Specified by:
stepBreakpointin interfaceorg.apache.camel.spi.BacklogDebugger
-
step
public void step()- Specified by:
stepin interfaceorg.apache.camel.spi.BacklogDebugger
-
stepOver
public void stepOver()- Specified by:
stepOverin interfaceorg.apache.camel.spi.BacklogDebugger
-
skipOver
public void skipOver()- Specified by:
skipOverin interfaceorg.apache.camel.spi.BacklogDebugger
-
getSuspendedBreakpointNodeIds
- Specified by:
getSuspendedBreakpointNodeIdsin interfaceorg.apache.camel.spi.BacklogDebugger
-
getSuspendedExchangeIds
- Specified by:
getSuspendedExchangeIdsin interfaceorg.apache.camel.spi.BacklogDebugger
-
getSuspendedExchange
- Specified by:
getSuspendedExchangein interfaceorg.apache.camel.spi.BacklogDebugger
-
getSuspendedBreakpointMessage
- Specified by:
getSuspendedBreakpointMessagein interfaceorg.apache.camel.spi.BacklogDebugger
-
disableBreakpoint
- Specified by:
disableBreakpointin interfaceorg.apache.camel.spi.BacklogDebugger
-
enableBreakpoint
- Specified by:
enableBreakpointin interfaceorg.apache.camel.spi.BacklogDebugger
-
isSingleStepIncludeStartEnd
public boolean isSingleStepIncludeStartEnd()- Specified by:
isSingleStepIncludeStartEndin interfaceorg.apache.camel.spi.BacklogDebugger
-
setSingleStepIncludeStartEnd
public void setSingleStepIncludeStartEnd(boolean singleStepIncludeStartEnd) - Specified by:
setSingleStepIncludeStartEndin interfaceorg.apache.camel.spi.BacklogDebugger
-
getBodyMaxChars
public int getBodyMaxChars()- Specified by:
getBodyMaxCharsin interfaceorg.apache.camel.spi.BacklogDebugger
-
setBodyMaxChars
public void setBodyMaxChars(int bodyMaxChars) - Specified by:
setBodyMaxCharsin interfaceorg.apache.camel.spi.BacklogDebugger
-
isBodyIncludeStreams
public boolean isBodyIncludeStreams()- Specified by:
isBodyIncludeStreamsin interfaceorg.apache.camel.spi.BacklogDebugger
-
setBodyIncludeStreams
public void setBodyIncludeStreams(boolean bodyIncludeStreams) - Specified by:
setBodyIncludeStreamsin interfaceorg.apache.camel.spi.BacklogDebugger
-
isBodyIncludeFiles
public boolean isBodyIncludeFiles()- Specified by:
isBodyIncludeFilesin interfaceorg.apache.camel.spi.BacklogDebugger
-
setBodyIncludeFiles
public void setBodyIncludeFiles(boolean bodyIncludeFiles) - Specified by:
setBodyIncludeFilesin interfaceorg.apache.camel.spi.BacklogDebugger
-
isIncludeExchangeProperties
public boolean isIncludeExchangeProperties()- Specified by:
isIncludeExchangePropertiesin interfaceorg.apache.camel.spi.BacklogDebugger
-
setIncludeExchangeProperties
public void setIncludeExchangeProperties(boolean includeExchangeProperties) - Specified by:
setIncludeExchangePropertiesin interfaceorg.apache.camel.spi.BacklogDebugger
-
isIncludeExchangeVariables
public boolean isIncludeExchangeVariables()- Specified by:
isIncludeExchangeVariablesin interfaceorg.apache.camel.spi.BacklogDebugger
-
setIncludeExchangeVariables
public void setIncludeExchangeVariables(boolean includeExchangeVariables) - Specified by:
setIncludeExchangeVariablesin interfaceorg.apache.camel.spi.BacklogDebugger
-
isIncludeException
public boolean isIncludeException()- Specified by:
isIncludeExceptionin interfaceorg.apache.camel.spi.BacklogDebugger
-
setIncludeException
public void setIncludeException(boolean includeException) - Specified by:
setIncludeExceptionin interfaceorg.apache.camel.spi.BacklogDebugger
-
dumpTracedMessagesAsXml
- Specified by:
dumpTracedMessagesAsXmlin interfaceorg.apache.camel.spi.BacklogDebugger
-
dumpTracedMessagesAsJSon
- Specified by:
dumpTracedMessagesAsJSonin interfaceorg.apache.camel.spi.BacklogDebugger
-
getDebugCounter
public long getDebugCounter()- Specified by:
getDebugCounterin interfaceorg.apache.camel.spi.BacklogDebugger
-
resetDebugCounter
public void resetDebugCounter()- Specified by:
resetDebugCounterin interfaceorg.apache.camel.spi.BacklogDebugger
-
beforeProcess
public org.apache.camel.util.StopWatch beforeProcess(org.apache.camel.Exchange exchange, org.apache.camel.Processor processor, org.apache.camel.NamedNode definition) - Specified by:
beforeProcessin interfaceorg.apache.camel.spi.BacklogDebugger
-
afterProcess
public void afterProcess(org.apache.camel.Exchange exchange, org.apache.camel.Processor processor, org.apache.camel.NamedNode definition, long timeTaken) - Specified by:
afterProcessin interfaceorg.apache.camel.spi.BacklogDebugger
-
doStart
- Overrides:
doStartin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
doStop
- Overrides:
doStopin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-