|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.jasmine.monitoring.mbeancmd.sampling.SampleData
public abstract class SampleData
Base class for all data classes.
| Field Summary | |
|---|---|
protected static DecimalFormat |
decimalFormat
Decimal formatter. |
| Constructor Summary | |
|---|---|
SampleData()
|
|
| Method Summary | |
|---|---|
abstract void |
compute(SampleData prev)
Compute based on a previous measurement, will fill all fields that are marked as being "computed" and don't have a public setter. |
protected double |
computeSamplePeriod(SampleData prev)
|
protected void |
concatDataElement(StringBuffer printData,
Object dataElement,
boolean end)
This method provides support for Null data elements. |
protected Object |
getAttribute(String name)
|
protected Double |
getAttributeAsDouble(String name)
|
protected Integer |
getAttributeAsInt(String name)
|
protected Long |
getAttributeAsLong(String name)
|
String |
getCmdId()
|
String |
getDomain()
|
protected abstract String |
getInnerPrintData()
|
protected abstract String |
getInnerPrintHeader()
|
String |
getJmxURL()
|
String |
getName()
|
String |
getObjectName()
|
String |
getPrintHeader()
Returns the full printout header for this data. |
long |
getSampleTime()
|
protected static String |
getSeparator()
|
String |
getServer()
|
Map<String,?> |
getValueOfAttributes()
|
protected boolean |
isValid()
|
void |
printData(PrintStream out)
Prints out all data in attributes based on the print header. |
protected void |
setAttribute(Attribute att)
|
void |
setCmdId(String cmdid)
|
protected void |
setObjectName(ObjectName on)
|
protected void |
setSampleTime(long t)
|
static void |
setSeparator(String s)
|
protected void |
setServerInfo(String name,
String jmxURL,
String server,
String domain)
|
protected void |
setValid(boolean status)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final DecimalFormat decimalFormat
| Constructor Detail |
|---|
public SampleData()
| Method Detail |
|---|
public abstract void compute(SampleData prev)
throws Exception
prev - Previous measurement.
Exceptionprotected double computeSamplePeriod(SampleData prev)
prev - data obtained at the previous sampling
public final String getPrintHeader()
getInnerPrintHeader() instead.
protected abstract String getInnerPrintHeader()
public void printData(PrintStream out)
out - Stream to print data values into.getPrintHeader(),
getInnerPrintData()protected abstract String getInnerPrintData()
public String getCmdId()
public void setCmdId(String cmdid)
public String getObjectName()
protected final void setObjectName(ObjectName on)
on - Object name to set.public final long getSampleTime()
protected final void setSampleTime(long t)
t - Time of sampling, origin is 01/01/1970.protected final void setAttribute(Attribute att)
att - Attribute to add in the list of data attributes.protected final Object getAttribute(String name)
name - Name of the attribute to get.
protected final Integer getAttributeAsInt(String name)
name - Name of the attribute to get.
protected void concatDataElement(StringBuffer printData,
Object dataElement,
boolean end)
printData - the current printDatadataElement - the data to be addedprotected final Long getAttributeAsLong(String name)
name - Name of the attribute to get.
protected final Double getAttributeAsDouble(String name)
name - Name of the attribute to get.
protected static final String getSeparator()
public static final void setSeparator(String s)
s - Separator to set.public final String getName()
public final String getJmxURL()
public final String getServer()
public final String getDomain()
protected final void setServerInfo(String name,
String jmxURL,
String server,
String domain)
name - Name set for the server in the jmxurls.properties file.jmxURL - JMX URL of the monitored server.server - Name of the server.domain - Domain name of the server.protected final void setValid(boolean status)
status - true to mark the data as valid, false otherwise.protected final boolean isValid()
public Map<String,?> getValueOfAttributes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||