org.apache.camel.processor
Class ThroughputLogger

java.lang.Object
  extended by org.apache.camel.processor.Logger
      extended by org.apache.camel.processor.ThroughputLogger
All Implemented Interfaces:
Processor

public class ThroughputLogger
extends Logger

A logger for logging message throughput.

Version:
$Revision: 754824 $

Constructor Summary
ThroughputLogger()
           
ThroughputLogger(int groupSize)
           
ThroughputLogger(org.apache.commons.logging.Log log)
           
ThroughputLogger(org.apache.commons.logging.Log log, LoggingLevel level)
           
ThroughputLogger(String logName)
           
ThroughputLogger(String logName, int groupSize)
           
ThroughputLogger(String logName, LoggingLevel level)
           
ThroughputLogger(String logName, LoggingLevel level, int groupSize)
           
 
Method Summary
protected  String createLogMessage(Exchange exchange, int receivedCount)
           
 String getAction()
           
 int getGroupSize()
           
 NumberFormat getNumberFormat()
           
protected  Object logMessage(Exchange exchange)
           
protected  double messagesPerSecond(long messageCount, long startTime, long endTime)
           
 void process(Exchange exchange)
          Processes the message exchange
 void setAction(String action)
           
 void setGroupSize(int groupSize)
           
 void setNumberFormat(NumberFormat numberFormat)
           
 
Methods inherited from class org.apache.camel.processor.Logger
getLevel, getLog, log, log, log, log, logMessage, process, process, setFormatter, setLevel, setLog, setLogName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThroughputLogger

public ThroughputLogger()

ThroughputLogger

public ThroughputLogger(org.apache.commons.logging.Log log)

ThroughputLogger

public ThroughputLogger(org.apache.commons.logging.Log log,
                        LoggingLevel level)

ThroughputLogger

public ThroughputLogger(String logName)

ThroughputLogger

public ThroughputLogger(String logName,
                        LoggingLevel level)

ThroughputLogger

public ThroughputLogger(String logName,
                        LoggingLevel level,
                        int groupSize)

ThroughputLogger

public ThroughputLogger(String logName,
                        int groupSize)

ThroughputLogger

public ThroughputLogger(int groupSize)
Method Detail

process

public void process(Exchange exchange)
Description copied from interface: Processor
Processes the message exchange

Specified by:
process in interface Processor
Overrides:
process in class Logger
Parameters:
exchange - the message exchange

getGroupSize

public int getGroupSize()

setGroupSize

public void setGroupSize(int groupSize)

getNumberFormat

public NumberFormat getNumberFormat()

setNumberFormat

public void setNumberFormat(NumberFormat numberFormat)

getAction

public String getAction()

setAction

public void setAction(String action)

logMessage

protected Object logMessage(Exchange exchange)
Overrides:
logMessage in class Logger

createLogMessage

protected String createLogMessage(Exchange exchange,
                                  int receivedCount)

messagesPerSecond

protected double messagesPerSecond(long messageCount,
                                   long startTime,
                                   long endTime)


Apache CAMEL