org.apache.camel.processor.interceptor
Class DefaultTraceFormatter

java.lang.Object
  extended by org.apache.camel.processor.interceptor.DefaultTraceFormatter
All Implemented Interfaces:
TraceFormatter

public class DefaultTraceFormatter
extends Object
implements TraceFormatter

Version:

Constructor Summary
DefaultTraceFormatter()
           
 
Method Summary
protected  String extractBreadCrumb(TraceInterceptor interceptor, ProcessorDefinition<?> currentNode, Exchange exchange)
          Creates the breadcrumb based on whether this was a trace of an exchange coming out of or into a processing step.
protected  String extractRoute(ProcessorDefinition<?> node)
           
 Object format(TraceInterceptor interceptor, ProcessorDefinition<?> node, Exchange exchange)
          Formats a log message at given point of interception.
protected  Object getBreadCrumbID(Exchange exchange)
           
 int getBreadCrumbLength()
           
 int getMaxChars()
           
 int getNodeLength()
           
protected  String getNodeMessage(RouteNode entry, Exchange exchange)
           
 boolean isShowBody()
           
 boolean isShowBodyType()
           
 boolean isShowBreadCrumb()
           
 boolean isShowException()
           
 boolean isShowExchangeId()
           
 boolean isShowExchangePattern()
           
 boolean isShowHeaders()
           
 boolean isShowNode()
           
 boolean isShowOutBody()
           
 boolean isShowOutBodyType()
           
 boolean isShowOutHeaders()
           
 boolean isShowProperties()
           
 boolean isShowRouteId()
           
 boolean isShowShortExchangeId()
           
 void setBreadCrumbLength(int breadCrumbLength)
           
 void setMaxChars(int maxChars)
           
 void setNodeLength(int nodeLength)
           
 void setShowBody(boolean showBody)
           
 void setShowBodyType(boolean showBodyType)
           
 void setShowBreadCrumb(boolean showBreadCrumb)
           
 void setShowException(boolean showException)
           
 void setShowExchangeId(boolean showExchangeId)
           
 void setShowExchangePattern(boolean showExchangePattern)
           
 void setShowHeaders(boolean showHeaders)
           
 void setShowNode(boolean showNode)
           
 void setShowOutBody(boolean showOutBody)
           
 void setShowOutBodyType(boolean showOutBodyType)
           
 void setShowOutHeaders(boolean showOutHeaders)
           
 void setShowProperties(boolean showProperties)
           
 void setShowRouteId(boolean showRouteId)
           
 void setShowShortExchangeId(boolean showShortExchangeId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTraceFormatter

public DefaultTraceFormatter()
Method Detail

format

public Object format(TraceInterceptor interceptor,
                     ProcessorDefinition<?> node,
                     Exchange exchange)
Description copied from interface: TraceFormatter
Formats a log message at given point of interception.

Specified by:
format in interface TraceFormatter
Parameters:
interceptor - the tracing interceptor
node - the node where the interception occurred
exchange - the current exchange
Returns:
the log message

isShowBody

public boolean isShowBody()

setShowBody

public void setShowBody(boolean showBody)

isShowBodyType

public boolean isShowBodyType()

setShowBodyType

public void setShowBodyType(boolean showBodyType)

setShowOutBody

public void setShowOutBody(boolean showOutBody)

isShowOutBody

public boolean isShowOutBody()

setShowOutBodyType

public void setShowOutBodyType(boolean showOutBodyType)

isShowOutBodyType

public boolean isShowOutBodyType()

isShowBreadCrumb

public boolean isShowBreadCrumb()

setShowBreadCrumb

public void setShowBreadCrumb(boolean showBreadCrumb)

isShowExchangeId

public boolean isShowExchangeId()

setShowExchangeId

public void setShowExchangeId(boolean showExchangeId)

isShowHeaders

public boolean isShowHeaders()

setShowHeaders

public void setShowHeaders(boolean showHeaders)

isShowOutHeaders

public boolean isShowOutHeaders()

setShowOutHeaders

public void setShowOutHeaders(boolean showOutHeaders)

isShowProperties

public boolean isShowProperties()

setShowProperties

public void setShowProperties(boolean showProperties)

isShowNode

public boolean isShowNode()

setShowNode

public void setShowNode(boolean showNode)

isShowExchangePattern

public boolean isShowExchangePattern()

setShowExchangePattern

public void setShowExchangePattern(boolean showExchangePattern)

isShowException

public boolean isShowException()

setShowException

public void setShowException(boolean showException)

isShowRouteId

public boolean isShowRouteId()

setShowRouteId

public void setShowRouteId(boolean showRouteId)

getBreadCrumbLength

public int getBreadCrumbLength()

setBreadCrumbLength

public void setBreadCrumbLength(int breadCrumbLength)

isShowShortExchangeId

public boolean isShowShortExchangeId()

setShowShortExchangeId

public void setShowShortExchangeId(boolean showShortExchangeId)

getNodeLength

public int getNodeLength()

setNodeLength

public void setNodeLength(int nodeLength)

getMaxChars

public int getMaxChars()

setMaxChars

public void setMaxChars(int maxChars)

extractRoute

protected String extractRoute(ProcessorDefinition<?> node)

getBreadCrumbID

protected Object getBreadCrumbID(Exchange exchange)

getNodeMessage

protected String getNodeMessage(RouteNode entry,
                                Exchange exchange)

extractBreadCrumb

protected String extractBreadCrumb(TraceInterceptor interceptor,
                                   ProcessorDefinition<?> currentNode,
                                   Exchange exchange)
Creates the breadcrumb based on whether this was a trace of an exchange coming out of or into a processing step. For example,
transform(body) -> ID-mojo/39713-1225468755256/2-0
or
ID-mojo/39713-1225468755256/2-0 -> transform(body)



Apache CAMEL