org.apache.servicemix.bean.pojos
Class LoggingPojo

java.lang.Object
  extended by org.apache.servicemix.bean.support.BeanSupport
      extended by org.apache.servicemix.bean.pojos.LoggingPojo
All Implemented Interfaces:
org.apache.servicemix.jbi.listener.MessageExchangeListener

public class LoggingPojo
extends BeanSupport
implements org.apache.servicemix.jbi.listener.MessageExchangeListener

A simple tracing component which can be placed inside a pipeline to trace the message exchange though the component. If an InOut exchange is received by this component, it will log the input message and copy it to the output message.

Version:
$Revision: 648504 $

Field Summary
 
Fields inherited from class org.apache.servicemix.bean.support.BeanSupport
logger
 
Constructor Summary
LoggingPojo()
           
 
Method Summary
 org.apache.commons.logging.Log getLog()
           
 int getMaxMsgDisplaySize()
           
 void onMessageExchange(javax.jbi.messaging.MessageExchange exchange)
          Intercepts the MessageExchange to output the message and its properties for debugging purposes.
 void setLog(org.apache.commons.logging.Log log)
           
 void setMaxMsgDisplaySize(int maxMsgDisplaySize)
           
 
Methods inherited from class org.apache.servicemix.bean.support.BeanSupport
answer, answer, createInOnlyExchange, createInOnlyExchange, createInOnlyExchange, createInOptionalOutExchange, createInOutExchange, createInOutExchange, createInOutExchange, createRobustInOnlyExchange, done, fail, fail, forwardToExchange, forwardToExchange, getBody, getContext, getDeliveryChannel, getEndpoint, getExchangeFactory, getExtensionMBeanName, getInMessage, getMessageTransformer, getService, getServiceEndpoint, invoke, isInAndOut, propagateCorrelationId, send, sendSync, sendSync, setBody, setContext, setExtensionMBeanName, setMessageTransformer, setServiceEndpoint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggingPojo

public LoggingPojo()
Method Detail

getLog

public org.apache.commons.logging.Log getLog()

setLog

public void setLog(org.apache.commons.logging.Log log)

getMaxMsgDisplaySize

public int getMaxMsgDisplaySize()

setMaxMsgDisplaySize

public void setMaxMsgDisplaySize(int maxMsgDisplaySize)

onMessageExchange

public void onMessageExchange(javax.jbi.messaging.MessageExchange exchange)
                       throws javax.jbi.messaging.MessagingException
Intercepts the MessageExchange to output the message and its properties for debugging purposes.

Specified by:
onMessageExchange in interface org.apache.servicemix.jbi.listener.MessageExchangeListener
Parameters:
exchange - A JBI MessageExchange between two endpoints
Throws:
javax.jbi.messaging.MessagingException


Copyright © 2005-2011 FuseSource. All Rights Reserved.