public final class BacklogTracer extends ServiceSupport implements InterceptStrategy
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_BACKLOG_SIZE |
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
static BacklogTracer |
createTracer(CamelContext context)
Creates a new backlog tracer.
|
protected void |
doStart()
Implementations override this method to support customized start/stop.
|
protected void |
doStop()
Implementations override this method to support customized start/stop.
|
List<BacklogTracerEventMessage> |
dumpAllTracedMessages() |
String |
dumpAllTracedMessagesAsXml() |
List<BacklogTracerEventMessage> |
dumpTracedMessages(String nodeId) |
String |
dumpTracedMessagesAsXml(String nodeId) |
int |
getBacklogSize() |
static BacklogTracer |
getBacklogTracer(CamelContext context)
A helper method to return the BacklogTracer instance if one is enabled
|
int |
getBodyMaxChars() |
long |
getTraceCounter() |
String |
getTraceFilter() |
String |
getTracePattern() |
long |
incrementTraceCounter() |
boolean |
isBodyIncludeFiles() |
boolean |
isBodyIncludeStreams() |
boolean |
isEnabled() |
boolean |
isRemoveOnDump() |
void |
resetTraceCounter() |
void |
setBacklogSize(int backlogSize) |
void |
setBodyIncludeFiles(boolean bodyIncludeFiles) |
void |
setBodyIncludeStreams(boolean bodyIncludeStreams) |
void |
setBodyMaxChars(int bodyMaxChars) |
void |
setEnabled(boolean enabled) |
void |
setRemoveOnDump(boolean removeOnDump) |
void |
setTraceFilter(String filter) |
void |
setTracePattern(String tracePattern) |
boolean |
shouldTrace(ProcessorDefinition<?> definition,
Exchange exchange)
Whether or not to trace the given processor definition.
|
void |
traceEvent(DefaultBacklogTracerEventMessage event) |
Processor |
wrapProcessorInInterceptors(CamelContext context,
ProcessorDefinition<?> definition,
Processor target,
Processor nextTarget)
Deprecated.
|
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic static final int MAX_BACKLOG_SIZE
@Deprecated public Processor wrapProcessorInInterceptors(CamelContext context, ProcessorDefinition<?> definition, Processor target, Processor nextTarget) throws Exception
InterceptStrategyProcessorDefinition.wrapProcessor(RouteContext, Processor)
to give the implementor an opportunity to wrap the target processor
in a route.
Important: See the class javadoc for advice on letting interceptor be compatible with the
asynchronous routing engine.wrapProcessorInInterceptors in interface InterceptStrategycontext - Camel contextdefinition - the model this interceptor representstarget - the processor to be wrappednextTarget - the next processor to be routed toException - can be thrownpublic static BacklogTracer createTracer(CamelContext context)
context - Camel contextpublic static BacklogTracer getBacklogTracer(CamelContext context)
public boolean shouldTrace(ProcessorDefinition<?> definition, Exchange exchange)
definition - the processor definitionexchange - the exchangepublic void traceEvent(DefaultBacklogTracerEventMessage event)
public boolean isEnabled()
public void setEnabled(boolean enabled)
public int getBacklogSize()
public void setBacklogSize(int backlogSize)
public boolean isRemoveOnDump()
public void setRemoveOnDump(boolean removeOnDump)
public int getBodyMaxChars()
public void setBodyMaxChars(int bodyMaxChars)
public boolean isBodyIncludeStreams()
public void setBodyIncludeStreams(boolean bodyIncludeStreams)
public boolean isBodyIncludeFiles()
public void setBodyIncludeFiles(boolean bodyIncludeFiles)
public String getTracePattern()
public void setTracePattern(String tracePattern)
public String getTraceFilter()
public void setTraceFilter(String filter)
public long getTraceCounter()
public void resetTraceCounter()
public List<BacklogTracerEventMessage> dumpTracedMessages(String nodeId)
public String dumpTracedMessagesAsXml(String nodeId)
public List<BacklogTracerEventMessage> dumpAllTracedMessages()
public String dumpAllTracedMessagesAsXml()
public void clear()
public long incrementTraceCounter()
protected void doStart() throws Exception
ServiceSupportServiceSupport.doStop() for more details.doStart in class ServiceSupportExceptionServiceSupport.doStop()protected void doStop() throws Exception
ServiceSupportServiceSupport.doStop() method when
the service is being stopped. This method will also be invoked
if the service is still in uninitialized state (eg has not
been started). The method is always called to allow the service
to do custom logic when the service is being stopped, such as when
CamelContext is shutting down.doStop in class ServiceSupportExceptionServiceSupport.doStart()Apache Camel