edu.cmu.cs.able.gaugeInfrastructure.RMI
Class RMIGaugeHandle

java.lang.Object
  |
  +--edu.cmu.cs.able.gaugeInfrastructure.RMI.RMIGaugeHandle
All Implemented Interfaces:
GaugeControl, java.io.Serializable

public class RMIGaugeHandle
extends java.lang.Object
implements GaugeControl, java.io.Serializable

RMIGaugeHandle is a proxy gauge that acts as if it is the actual gauge it refers to. It is used to hide the details of how to maintain the peer-to-peer interaction between a local caller (or client) and a remote callee (or server).

Since:
JDK1.3.1
See Also:
Serialized Form

Field Summary
protected  RMIGaugeHandleInt gaugeHandle
           
 
Constructor Summary
RMIGaugeHandle(java.lang.String host)
          Creates new RMIGauge
 
Method Summary
 boolean configure(StringPairVector configParams)
          The method called when configuring a gauge.
 StringPairVector getConfigParams()
           
 int getConfigParamsSize()
           
 GaugeID getGaugeID()
          Each gauge implementation must have an ID
 StringPairVector getSetupParams()
           
 int getSetupParamsSize()
           
 boolean queryAllValues(GaugeValueVector values)
          Returns all the gauge values that the gauge reports.
 boolean queryState(StringPairVector setupParams, StringPairVector configParams, StringPairVector mappings)
          The method called to query the state of the gauge
 java.lang.String queryValue(java.lang.String valueName)
          Called when a gauge is queried for a value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gaugeHandle

protected RMIGaugeHandleInt gaugeHandle
Constructor Detail

RMIGaugeHandle

public RMIGaugeHandle(java.lang.String host)
Creates new RMIGauge
Method Detail

getGaugeID

public GaugeID getGaugeID()
Description copied from interface: GaugeControl
Each gauge implementation must have an ID
Specified by:
getGaugeID in interface GaugeControl
Following copied from interface: edu.cmu.cs.able.gaugeInfrastructure.GaugeControl
Returns:
The ID of the gauge

getConfigParams

public StringPairVector getConfigParams()

getConfigParamsSize

public int getConfigParamsSize()

getSetupParams

public StringPairVector getSetupParams()

getSetupParamsSize

public int getSetupParamsSize()

configure

public boolean configure(StringPairVector configParams)
Description copied from interface: GaugeControl
The method called when configuring a gauge.
Specified by:
configure in interface GaugeControl
Following copied from interface: edu.cmu.cs.able.gaugeInfrastructure.GaugeControl
Parameters:
configParams - The configuration parameters for the gauge as (name, value) pairs.
Returns:
true if the gauge could be configured successfully; false otherwise

queryAllValues

public boolean queryAllValues(GaugeValueVector values)
Description copied from interface: GaugeControl
Returns all the gauge values that the gauge reports.
Specified by:
queryAllValues in interface GaugeControl
Following copied from interface: edu.cmu.cs.able.gaugeInfrastructure.GaugeControl
Parameters:
values - This is filled with all the values as a (valueName, propertyName, value) tuple
Returns:
true if the values were successfully determined; false otherwise.

queryState

public boolean queryState(StringPairVector setupParams,
                          StringPairVector configParams,
                          StringPairVector mappings)
Description copied from interface: GaugeControl
The method called to query the state of the gauge
Specified by:
queryState in interface GaugeControl
Following copied from interface: edu.cmu.cs.able.gaugeInfrastructure.GaugeControl
Parameters:
setupParams - Will be filled with the parameters with which the gauge was setup, as (name, value) pairs.
configParams - Will be filled with the current configuration of the gauge, as (name, value) pairs
mappings - Will be filled with the mappings for the gauge, as (name, propertyName) pairs.
Returns:
true if the gauge successfully returns its state; false otherwise

queryValue

public java.lang.String queryValue(java.lang.String valueName)
Description copied from interface: GaugeControl
Called when a gauge is queried for a value. This provides an alternative to the gauge reporting events.
Specified by:
queryValue in interface GaugeControl
Following copied from interface: edu.cmu.cs.able.gaugeInfrastructure.GaugeControl
Parameters:
valueName - The name of the value to be queried.
Returns:
The value corresponding to the name passed in; null indicates that the gauge value could not be determined.