cppncss
Class XmlResultOutput

java.lang.Object
  extended by cppncss.AbstractResultOutput
      extended by cppncss.XmlResultOutput
All Implemented Interfaces:
ResultOutput

public final class XmlResultOutput
extends AbstractResultOutput

Implements an xml result output.

Author:
Mathieu Champlon

Constructor Summary
XmlResultOutput(java.io.PrintStream stream)
          Create an xml result output.
 
Method Summary
 void flush()
          Notify about the end of the result flow.
 void notify(java.lang.String type, java.lang.String label, float average)
          Notify about an average.
 void notify(java.lang.String type, java.lang.String label, long sum)
          Notify about a sum.
protected  void printHeaders(java.lang.String type, java.util.List<java.lang.String> labels)
          Print measurements headers.
protected  void printIndex(java.lang.String item, int index)
          Print the index of an item.
protected  void printItem(java.lang.String item)
          Print an item.
protected  void printMeasurement(java.lang.String label, int count)
          Print a measurement.
 
Methods inherited from class cppncss.AbstractResultOutput
notify, notify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlResultOutput

public XmlResultOutput(java.io.PrintStream stream)
Create an xml result output.

Parameters:
stream - the stream to write to
Method Detail

printHeaders

protected void printHeaders(java.lang.String type,
                            java.util.List<java.lang.String> labels)
Print measurements headers.

Specified by:
printHeaders in class AbstractResultOutput
Parameters:
type - the type of the measurement
labels - a list of all measurement names

printItem

protected void printItem(java.lang.String item)
Print an item.

Specified by:
printItem in class AbstractResultOutput
Parameters:
item - the name of the item

printMeasurement

protected void printMeasurement(java.lang.String label,
                                int count)
Print a measurement.

Specified by:
printMeasurement in class AbstractResultOutput
Parameters:
label - the name of the measurement
count - the result value of the measurement

printIndex

protected void printIndex(java.lang.String item,
                          int index)
Print the index of an item.

Specified by:
printIndex in class AbstractResultOutput
Parameters:
item - the name of the item
index - the index

notify

public void notify(java.lang.String type,
                   java.lang.String label,
                   float average)
Notify about an average.

Parameters:
type - the type of measure
label - the measured item
average - the result

notify

public void notify(java.lang.String type,
                   java.lang.String label,
                   long sum)
Notify about a sum.

Parameters:
type - the type of measure
label - the measured item
sum - the result

flush

public void flush()
Notify about the end of the result flow.



Copyright © 2006-2007 null. All Rights Reserved.