org.apache.excalibur.instrument.client.http
Class HTTPInstrumentSampleSnapshotData

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.excalibur.instrument.client.http.AbstractHTTPData
          extended by org.apache.excalibur.instrument.client.http.AbstractHTTPElementData
              extended by org.apache.excalibur.instrument.client.http.AbstractHTTPInstrumentSampleElementData
                  extended by org.apache.excalibur.instrument.client.http.HTTPInstrumentSampleSnapshotData
All Implemented Interfaces:
org.apache.avalon.framework.logger.LogEnabled, Data, ElementData, InstrumentSampleElementData, InstrumentSampleSnapshotData

 class HTTPInstrumentSampleSnapshotData
extends AbstractHTTPInstrumentSampleElementData
implements InstrumentSampleSnapshotData


Field Summary
private  int[] m_samples
          Array of values which make up the sample.
 
Fields inherited from interface org.apache.excalibur.instrument.client.InstrumentSampleElementData
INSTRUMENT_SAMPLE_TYPE_COUNTER, INSTRUMENT_SAMPLE_TYPE_MAXIMUM, INSTRUMENT_SAMPLE_TYPE_MEAN, INSTRUMENT_SAMPLE_TYPE_MINIMUM
 
Constructor Summary
HTTPInstrumentSampleSnapshotData(HTTPInstrumentManagerConnection connection, java.lang.String name)
          Creates a new HTTPInstrumentSampleSnapshotData.
 
Method Summary
 Data getParent()
          Returns the parent data object.
 int[] getSamples()
          Returns an array of the individual values which make up the sample.
 boolean update()
          Causes the InstrumentSampleSnapshotData to update itself with the latest data from the server.
protected  void update(org.apache.avalon.framework.configuration.Configuration configuration)
          Update the contents of the object using values from the Configuration object.
 
Methods inherited from class org.apache.excalibur.instrument.client.http.AbstractHTTPInstrumentSampleElementData
getInstrumentType, getInterval, getLeaseExpirationTime, getSize, getTime, getType, getValue
 
Methods inherited from class org.apache.excalibur.instrument.client.http.AbstractHTTPElementData
getName, isConfigured, lastNameToken
 
Methods inherited from class org.apache.excalibur.instrument.client.http.AbstractHTTPData
getConnection, getDescription, getStateVersion, urlEncode
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.excalibur.instrument.client.InstrumentSampleElementData
getInstrumentType, getInterval, getLeaseExpirationTime, getSize, getTime, getType, getValue
 
Methods inherited from interface org.apache.excalibur.instrument.client.ElementData
getName, isConfigured
 
Methods inherited from interface org.apache.excalibur.instrument.client.Data
getDescription, getStateVersion
 

Field Detail

m_samples

private int[] m_samples
Array of values which make up the sample.

Constructor Detail

HTTPInstrumentSampleSnapshotData

HTTPInstrumentSampleSnapshotData(HTTPInstrumentManagerConnection connection,
                                 java.lang.String name)
Creates a new HTTPInstrumentSampleSnapshotData.

Parameters:
connection - The connection used to communicate with the server.
name - The name of the data element.
Method Detail

getParent

public Data getParent()
Returns the parent data object.

Specified by:
getParent in interface ElementData
Overrides:
getParent in class AbstractHTTPElementData
Returns:
The parent data object.

update

protected void update(org.apache.avalon.framework.configuration.Configuration configuration)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Update the contents of the object using values from the Configuration object.

Overrides:
update in class AbstractHTTPInstrumentSampleElementData
Parameters:
configuration - Configuration object to load from.
Throws:
org.apache.avalon.framework.configuration.ConfigurationException - If there are any problems.

update

public boolean update()
Causes the InstrumentSampleSnapshotData to update itself with the latest data from the server.

Specified by:
update in interface Data
Returns:
true if successful.

getSamples

public int[] getSamples()
Returns an array of the individual values which make up the sample.

Specified by:
getSamples in interface InstrumentSampleSnapshotData
Returns:
An array of sample values.