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:
$Revision: 750806 $

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.
 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 getNodeLength()
           
protected  String getNodeMessage(ProcessorDefinition node)
           
 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 isShowShortExchangeId()
           
 void setBreadCrumbLength(int breadCrumbLength)
           
 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 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 occured
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)

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)

getBreadCrumbID

protected Object getBreadCrumbID(Exchange exchange)

getNodeMessage

protected String getNodeMessage(ProcessorDefinition node)

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)



Copyright © 2009 Apache Software Foundation. All Rights Reserved.