org.ow2.jasmine.monitoring.mbeancmd.sampling
Class XSampleData

java.lang.Object
  extended byorg.ow2.jasmine.monitoring.mbeancmd.sampling.SampleData
      extended byorg.ow2.jasmine.monitoring.mbeancmd.sampling.XSampleData

public class XSampleData
extends SampleData

SampleData where sampling operates on a Set.


Field Summary
private  java.util.Map samples
          SampleData included in this instance.
 
Fields inherited from class org.ow2.jasmine.monitoring.mbeancmd.sampling.SampleData
decimalFormat
 
Constructor Summary
XSampleData()
           
 
Method Summary
 void compute(SampleData needs_cast)
          Implementation of inherited abstract method.
 SampleData get(javax.management.ObjectName on)
          Gets the SampleData associated with a given ObjectName.
protected  java.lang.String getInnerPrintData()
          Implementation of inherited abstract method.
protected  java.lang.String getInnerPrintHeader()
          Implementation of inherited abstract method.
 void printData(java.io.PrintStream out)
          Prints out all data in attributes based on the print header.
 SampleData put(javax.management.ObjectName on, SampleData data)
          Puts an object in samples.
 
Methods inherited from class org.ow2.jasmine.monitoring.mbeancmd.sampling.SampleData
getAttribute, getAttributeAsDouble, getAttributeAsInt, getAttributeAsLong, getDomain, getName, getPrintHeader, getSampleTime, getSeparator, getServer, isValid, setAttribute, setObjectName, setSampleTime, setSeparator, setServerInfo, setValid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

samples

private java.util.Map samples
SampleData included in this instance. TODO: Implementation note: ObjectName in Java 4 or 5 doesn't implement Comparable, therefore TreeMap will throw a ClassCastException. That problem has been fixed in Java 6.

Constructor Detail

XSampleData

public XSampleData()
Method Detail

compute

public void compute(SampleData needs_cast)
Implementation of inherited abstract method. Calls @link{SampleData#compute(SampleData)} on each member of samples.

Specified by:
compute in class SampleData
Parameters:
needs_cast - Previous measurement.

printData

public final void printData(java.io.PrintStream out)
Prints out all data in attributes based on the print header.

Overrides:
printData in class SampleData
Parameters:
out - Stream to print data values into.
See Also:
SampleData.getPrintHeader(), SampleData.getInnerPrintData()

getInnerPrintHeader

protected java.lang.String getInnerPrintHeader()
Implementation of inherited abstract method.

Specified by:
getInnerPrintHeader in class SampleData
Returns:
The inner (specialized) part of the header for this data type.
See Also:
SampleData.getInnerPrintHeader()

getInnerPrintData

protected java.lang.String getInnerPrintData()
Implementation of inherited abstract method.

Specified by:
getInnerPrintData in class SampleData
Returns:
The inner (specialized) part of the data for this data type.
See Also:
SampleData.getInnerPrintData()

put

public SampleData put(javax.management.ObjectName on,
                      SampleData data)
Puts an object in samples.

Parameters:
on - ObjectName to use.
data - SampleData instance to link with that name.
Returns:
data that's just been added.

get

public SampleData get(javax.management.ObjectName on)
Gets the SampleData associated with a given ObjectName.

Parameters:
on - ObjectName to look for.
Returns:
SampleData instance that's linked with that object name.