cppncss
Class AbstractResultOutput

java.lang.Object
  extended by cppncss.AbstractResultOutput
All Implemented Interfaces:
ResultOutput
Direct Known Subclasses:
AsciiResultOutput, XmlResultOutput

public abstract class AbstractResultOutput
extends java.lang.Object
implements ResultOutput

Captures behaviours common to all result outputs.

Author:
Mathieu Champlon

Constructor Summary
AbstractResultOutput()
           
 
Method Summary
 void notify(java.lang.String type, java.util.List<java.lang.String> labels)
          Notify about a list of labels.
 void notify(java.lang.String type, java.lang.String item, int count)
          Notify about a measurement.
protected abstract  void printHeaders(java.lang.String type, java.util.List<java.lang.String> labels)
          Print measurements headers.
protected abstract  void printIndex(java.lang.String item, int index)
          Print the index of an item.
protected abstract  void printItem(java.lang.String item)
          Print an item.
protected abstract  void printMeasurement(java.lang.String label, int count)
          Print a measurement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cppncss.ResultOutput
flush, notify, notify
 

Constructor Detail

AbstractResultOutput

public AbstractResultOutput()
Method Detail

notify

public final void notify(java.lang.String type,
                         java.util.List<java.lang.String> labels)
Notify about a list of labels.

Specified by:
notify in interface ResultOutput
Parameters:
type - the type of measure
labels - a list of measurements

notify

public final void notify(java.lang.String type,
                         java.lang.String item,
                         int count)
Notify about a measurement.

Specified by:
notify in interface ResultOutput
Parameters:
type - the type of measure
item - the measured item
count - the result

printHeaders

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

Parameters:
type - the type of the measurement
labels - a list of all measurement names

printIndex

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

Parameters:
item - the name of the item
index - the index

printItem

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

Parameters:
item - the name of the item

printMeasurement

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

Parameters:
label - the name of the measurement
count - the result value of the measurement


Copyright © 2006-2007 null. All Rights Reserved.