net.sf.jbenchmark.util
Class AbstractStatisticPublisher

java.lang.Object
  extended bynet.sf.jbenchmark.util.AbstractStatisticPublisher
All Implemented Interfaces:
StatisticPublisher
Direct Known Subclasses:
ConsolePublisher, FilePublisher

public abstract class AbstractStatisticPublisher
extends java.lang.Object
implements StatisticPublisher

Generates the output in Twiki format.

Version:
$Id: AbstractStatisticPublisher.java,v 1.2 2004/07/02 01:11:34 twpatkua Exp $
Author:
Patrick Kua

Constructor Summary
AbstractStatisticPublisher()
           
 
Method Summary
 StatisticFormatter getFormatter()
          Return the formatter to be used for this publisher.
abstract  java.io.PrintWriter getPrintWriter()
          Return the print writer to which this publisher will publish to.
abstract  boolean printHeader()
          Determine if we need the header or not.
 void publish(StatisticsSummary statisticsSummary)
          Generate the statistics in Twiki format.
 void setFormatter(StatisticFormatter formatter)
          Set the formatter to be used for this publisher.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractStatisticPublisher

public AbstractStatisticPublisher()
Method Detail

getPrintWriter

public abstract java.io.PrintWriter getPrintWriter()
Return the print writer to which this publisher will publish to.

Specified by:
getPrintWriter in interface StatisticPublisher

printHeader

public abstract boolean printHeader()
Determine if we need the header or not.


getFormatter

public StatisticFormatter getFormatter()
Return the formatter to be used for this publisher.


setFormatter

public void setFormatter(StatisticFormatter formatter)
Set the formatter to be used for this publisher.

Specified by:
setFormatter in interface StatisticPublisher

publish

public void publish(StatisticsSummary statisticsSummary)
Generate the statistics in Twiki format. When publishing it is assumed that the print writer that is made available has been opened for reading. Where the print writer is being managed should also be closed outside of this.

Specified by:
publish in interface StatisticPublisher