org.apache.camel.fabric
Class FabricTracer
java.lang.Object
org.apache.camel.impl.ServiceSupport
org.apache.camel.fabric.FabricTracer
- All Implemented Interfaces:
- Service, ShutdownableService, InterceptStrategy
@ManagedResource(value="FabricTracer")
public class FabricTracer
- extends ServiceSupport
- implements InterceptStrategy
| Methods inherited from class org.apache.camel.impl.ServiceSupport |
addChildService, doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, start, stop, suspend |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FabricTracer
public FabricTracer(CamelContext camelContext)
wrapProcessorInInterceptors
public Processor wrapProcessorInInterceptors(CamelContext context,
ProcessorDefinition<?> definition,
Processor target,
Processor nextTarget)
throws Exception
- Description copied from interface:
InterceptStrategy
- This method is invoked by
ProcessorDefinition.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.
- Specified by:
wrapProcessorInInterceptors in interface InterceptStrategy
- Parameters:
context - Camel contextdefinition - the model this interceptor representstarget - the processor to be wrappednextTarget - the next processor to be routed to
- Returns:
- processor wrapped with an interceptor or not wrapped.
- Throws:
Exception - can be thrown
shouldTrace
public boolean shouldTrace(ProcessorDefinition<?> definition)
- Whether or not to trace the given processor definition.
- Parameters:
definition - the processor definition
- Returns:
- true to trace, false to skip tracing
isEnabled
@ManagedAttribute(description="Is tracing enabled")
public boolean isEnabled()
setEnabled
@ManagedAttribute(description="Is tracing enabled")
public void setEnabled(boolean enabled)
getQueueSize
@ManagedAttribute(description="Number of traced messages to keep in FIFO queue")
public int getQueueSize()
setQueueSize
@ManagedAttribute(description="Number of traced messages to keep in FIFO queue")
public void setQueueSize(int queueSize)
getTraceCounter
@ManagedAttribute(description="Number of total traced messages")
public long getTraceCounter()
resetTraceCounter
@ManagedOperation(description="Resets the trace counter")
public void resetTraceCounter()
dumpTracedMessages
@ManagedOperation(description="Dumps the traced messages for the given node")
public List<FabricTracerEventMessage> dumpTracedMessages(String nodeId)
dumpTracedMessagesAsXml
@ManagedOperation(description="Dumps the traced messages for the given node in xml format")
public String dumpTracedMessagesAsXml(String nodeId)
dumpAllTracedMessages
@ManagedOperation(description="Dumps the traced messages for all nodes")
public List<FabricTracerEventMessage> dumpAllTracedMessages()
dumpAllTracedMessagesAsXml
@ManagedOperation(description="Dumps the traced messages for all nodes in xml format")
public String dumpAllTracedMessagesAsXml()
doStart
protected void doStart()
throws Exception
- Specified by:
doStart in class ServiceSupport
- Throws:
Exception
doStop
protected void doStop()
throws Exception
- Specified by:
doStop in class ServiceSupport
- Throws:
Exception
Apache CAMEL