org.apache.camel.fabric
Class FabricTracer
java.lang.Object
org.apache.camel.support.ServiceSupport
org.apache.camel.fabric.FabricTracer
- All Implemented Interfaces:
- Service, ShutdownableService, InterceptStrategy, StatefulService, SuspendableService
@ManagedResource(description="FabricTracer")
public class FabricTracer
- extends ServiceSupport
- implements InterceptStrategy
Methods inherited from class org.apache.camel.support.ServiceSupport |
doResume, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, resume, shutdown, 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
- Description copied from class:
ServiceSupport
- Implementations override this method to support customized start/stop.
Important: See
ServiceSupport.doStop()
for more details.
- Specified by:
doStart
in class ServiceSupport
- Throws:
Exception
- See Also:
ServiceSupport.doStop()
doStop
protected void doStop()
throws Exception
- Description copied from class:
ServiceSupport
- Implementations override this method to support customized start/stop.
Important: Camel will invoke this
ServiceSupport.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.
- Specified by:
doStop
in class ServiceSupport
- Throws:
Exception
- See Also:
ServiceSupport.doStart()
doShutdown
protected void doShutdown()
throws Exception
- Description copied from class:
ServiceSupport
- Implementations override this method to perform customized shutdown.
- Overrides:
doShutdown
in class ServiceSupport
- Throws:
Exception
Apache CAMEL