cppncss
Class ResultOutputAdapter

java.lang.Object
  extended by cppncss.ResultOutputAdapter
All Implemented Interfaces:
AverageObserver, MeasureObserver, SumObserver

public final class ResultOutputAdapter
extends java.lang.Object
implements MeasureObserver, AverageObserver, SumObserver

Provides an adapter between measurement observers and result outputs.

Author:
Mathieu Champlon

Constructor Summary
ResultOutputAdapter(java.lang.String type, ResultOutput output)
          Create a result handler.
 
Method Summary
 void notify(java.util.List<java.lang.String> labels)
          Notify of the labels of the measures.
 void notify(java.lang.String label, float average)
          Notify of the average of measures.
 void notify(java.lang.String item, int count)
          Notify of a measure.
 void notify(java.lang.String label, long sum)
          Notify of the sum of measures.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultOutputAdapter

public ResultOutputAdapter(java.lang.String type,
                           ResultOutput output)
Create a result handler.

Parameters:
type - the type of measurement
output - the output
Method Detail

notify

public void notify(java.util.List<java.lang.String> labels)
Notify of the labels of the measures.

Specified by:
notify in interface MeasureObserver
Parameters:
labels - the list of the measures.

notify

public void notify(java.lang.String item,
                   int count)
Notify of a measure.

Specified by:
notify in interface MeasureObserver
Parameters:
item - the name of the measured item
count - the result of the measure

notify

public void notify(java.lang.String label,
                   float average)
Notify of the average of measures.

Specified by:
notify in interface AverageObserver
Parameters:
label - the name of the measurement
average - the resulting value

notify

public void notify(java.lang.String label,
                   long sum)
Notify of the sum of measures.

Specified by:
notify in interface SumObserver
Parameters:
label - the name of the measurement
sum - the resulting value


Copyright © 2006-2007 null. All Rights Reserved.