edu.cmu.cs.able.gaugeInfrastructure.RMI
Class RMIGaugeManagerHandle
java.lang.Object
|
+--edu.cmu.cs.able.gaugeInfrastructure.RMI.RMIGaugeManagerHandle
- All Implemented Interfaces:
- GaugeMgr
- public class RMIGaugeManagerHandle
- extends java.lang.Object
- implements GaugeMgr
RMIGaugeManagerHandle is a proxy gauge manager that acts as if it is the actual
gauge manager 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
Constructor Summary |
RMIGaugeManagerHandle(java.lang.String host,
java.lang.String gaugeType)
Constructor of RMIGaugeConsumer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
gaugeBus
protected RMIGaugeReportingBus gaugeBus
- The reporting bus that gauges report through.
mgrID
protected java.lang.String mgrID
mgrType
protected java.lang.String mgrType
busHost
protected static java.lang.String busHost
RMIGaugeManagerHandle
public RMIGaugeManagerHandle(java.lang.String host,
java.lang.String gaugeType)
- Constructor of RMIGaugeConsumer
getGaugeMgrID
public java.lang.String getGaugeMgrID()
- Each gauge manager has a unique ID.
- Specified by:
getGaugeMgrID
in interface GaugeMgr
- Returns:
- The identifier of the gauge manager.
createGauge
public GaugeControl createGauge(GaugeID gauge,
StringPairVector setupParams,
StringPairVector mappings)
- Creates a new gauge with the information specified.
- Specified by:
createGauge
in interface GaugeMgr
- Parameters:
gauge
- The ID of the gauge to be created.setupParams
- The parameters with which to set up the gauge.mappings
- The mappings of values to model properties for how
the gauge should report values.- Returns:
- A new
GaugeControl
interface. Note that the GaugeID
of this GaugeControl may be different to the GaugeID
passed in as paramters.
In particular, the modelName and uid may be different.
managesType
public boolean managesType(java.lang.String gaugeType)
- Determines whether this gauge manager can manage gauges of
a particular type.
- Specified by:
managesType
in interface GaugeMgr
- Parameters:
gaugeType
- The type of the gauge being queried- Returns:
- true if the gauge manager managers this type; false otherwise.
deleteGauge
public boolean deleteGauge(GaugeControl gauge)
- Deletes a gauge. A gauge will send out a final delete announcement
so that all consumers can be informed.
- Specified by:
deleteGauge
in interface GaugeMgr
- Parameters:
gauge
- The gauge to be deleted.- Returns:
- true if the gauge was deleted; false otherwise.
queryMetaInfo
public boolean queryMetaInfo(java.lang.String gaugeType,
StringPairVector configParamsMeta,
StringPairVector valuesMeta)
- Fills in the type information for a gauge type.
- Specified by:
queryMetaInfo
in interface GaugeMgr
- Parameters:
gaugeType
- The type of the gauge for which information is being queried.configParamsMeta
- Filled in with the parameters that can be used to configure a gauge as (name, type) pairs.valuesMeta
- Filled in with the values that the gauge can report, as (name, type) pairs.- Returns:
- true if the information could be determined; false otherwise.