|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.processor.interceptor.Tracer
public class Tracer
An interceptor strategy for tracing routes
| Constructor Summary | |
|---|---|
Tracer()
|
|
| Method Summary | |
|---|---|
static Tracer |
createTracer(CamelContext context)
Creates a new tracer. |
DefaultTraceFormatter |
getDefaultTraceFormatter()
|
Endpoint |
getDestination()
|
String |
getDestinationUri()
|
TraceFormatter |
getFormatter()
|
Logger |
getLogger(ExchangeFormatter formatter)
Gets the logger to be used for tracers that can format and log a given exchange. |
LoggingLevel |
getLogLevel()
|
String |
getLogName()
|
Predicate |
getTraceFilter()
|
static Tracer |
getTracer(CamelContext context)
A helper method to return the Tracer instance if one is enabled |
boolean |
isEnabled()
|
boolean |
isLogStackTrace()
|
boolean |
isTraceExceptions()
|
boolean |
isTraceInterceptors()
|
boolean |
isTraceOutExchanges()
|
boolean |
isUseJpa()
|
void |
setDestination(Endpoint destination)
See setDestinationUri(String) |
void |
setDestinationUri(String destinationUri)
Sets an optional destination to send the traced Exchange. |
void |
setEnabled(boolean flag)
|
void |
setFormatter(TraceFormatter formatter)
|
void |
setLogLevel(LoggingLevel logLevel)
Sets the logging level to output tracing. |
void |
setLogName(String logName)
Sets the logging name to use. |
void |
setLogStackTrace(boolean logStackTrace)
Sets whether thrown exception stacktrace should be traced, if disabled then only the exception message is logged |
void |
setTraceExceptions(boolean traceExceptions)
Sets whether thrown exceptions should be traced |
void |
setTraceFilter(Predicate traceFilter)
Sets a predicate to be used as filter when tracing |
void |
setTraceInterceptors(boolean traceInterceptors)
Sets whether interceptors should be traced or not |
void |
setTraceOutExchanges(boolean traceOutExchanges)
Sets whether exchanges coming out of processors should be traced |
void |
setUseJpa(boolean useJpa)
Sets whether we should use a JpaTraceEventMessage instead of an ordinary DefaultTraceEventMessage
Use this to allow persistence of trace events into a database using JPA. |
void |
start()
Starts the service |
void |
stop()
Stops the service |
String |
toString()
|
Processor |
wrapProcessorInInterceptors(CamelContext context,
ProcessorDefinition<?> definition,
Processor target,
Processor nextTarget)
This method is invoked by ProcessorDefinition.wrapProcessor(RouteContext, Processor)
to give the implementor an opportunity to wrap the target processor
in a route. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Tracer()
| Method Detail |
|---|
public static Tracer createTracer(CamelContext context)
context - Camel context
public static Tracer getTracer(CamelContext context)
public Logger getLogger(ExchangeFormatter formatter)
formatter - the exchange formatter
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.
wrapProcessorInInterceptors in interface InterceptStrategycontext - Camel contextdefinition - the model this interceptor representstarget - the processor to be wrappednextTarget - the next processor to be routed to
Exception - can be thrownpublic TraceFormatter getFormatter()
public DefaultTraceFormatter getDefaultTraceFormatter()
public void setFormatter(TraceFormatter formatter)
public void setEnabled(boolean flag)
public boolean isEnabled()
public boolean isTraceInterceptors()
public void setTraceInterceptors(boolean traceInterceptors)
public Predicate getTraceFilter()
public void setTraceFilter(Predicate traceFilter)
public LoggingLevel getLogLevel()
public void setLogLevel(LoggingLevel logLevel)
public boolean isTraceExceptions()
public void setTraceExceptions(boolean traceExceptions)
public boolean isLogStackTrace()
public void setLogStackTrace(boolean logStackTrace)
public String getLogName()
public void setLogName(String logName)
public void setTraceOutExchanges(boolean traceOutExchanges)
public boolean isTraceOutExchanges()
public String getDestinationUri()
public void setDestinationUri(String destinationUri)
public Endpoint getDestination()
public void setDestination(Endpoint destination)
setDestinationUri(String)
public boolean isUseJpa()
public void setUseJpa(boolean useJpa)
DefaultTraceEventMessage
Use this to allow persistence of trace events into a database using JPA.
This requires camel-jpa in the classpath.
public String toString()
toString in class Object
public void start()
throws Exception
Service
start in interface ServiceException - is thrown if starting failed
public void stop()
throws Exception
Service
stop in interface ServiceException - is thrown if stopping failed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||