edu.cmu.cs.able.gauges.Siena
Class SienaBandwidthGaugeMgr

java.lang.Object
  |
  +--edu.cmu.cs.able.gaugeInfrastructure.Siena.SienaGaugeMgr
        |
        +--edu.cmu.cs.able.gauges.Siena.SienaBandwidthGaugeMgr
All Implemented Interfaces:
edu.cmu.cs.able.gaugeInfrastructure.GaugeMgr, java.lang.Runnable

public class SienaBandwidthGaugeMgr
extends edu.cmu.cs.able.gaugeInfrastructure.Siena.SienaGaugeMgr
implements java.lang.Runnable


Field Summary
 java.lang.String senp
           
 
Fields inherited from class edu.cmu.cs.able.gaugeInfrastructure.Siena.SienaGaugeMgr
gauges
 
Constructor Summary
SienaBandwidthGaugeMgr(java.lang.String senp, boolean register)
          Creates new SienaBandwidthGaugeMgr
 
Method Summary
 edu.cmu.cs.able.gaugeInfrastructure.GaugeControl createGauge(edu.cmu.cs.able.gaugeInfrastructure.util.GaugeID gauge, edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector setupParams, edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector mappings)
          Creates a new gauge as a separate process.
 boolean deleteGauge(edu.cmu.cs.able.gaugeInfrastructure.GaugeControl gauge)
          Deletes the gauge process associated with the gauge ID.
static void main(java.lang.String[] args)
          A way to start the gauge manager from the command line.
 boolean managesType(java.lang.String gaugeType)
          Returns true if the gauge type is edu.cmu.cs.able.gauges.Siena.SienaBandwidthGauge
static void printUsageMessage()
          Prints the usage message.
 boolean queryMetaInfo(java.lang.String gaugeType, edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector configParamsMeta, edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector valuesMeta)
          Returns the parameters that can be used to configure the gauge, as well as the values reported by the gauge, for a particular gauge type.
 void run()
          Implements the run method for threads.
 
Methods inherited from class edu.cmu.cs.able.gaugeInfrastructure.Siena.SienaGaugeMgr
getGaugeMgrID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

senp

public java.lang.String senp
Constructor Detail

SienaBandwidthGaugeMgr

public SienaBandwidthGaugeMgr(java.lang.String senp,
                              boolean register)
Creates new SienaBandwidthGaugeMgr
Parameters:
senp - The Siena port to connect to to receive information from gauge consumers and gauges.
register - Indicates whether the gauge manager should be registed with the bus.
Method Detail

createGauge

public edu.cmu.cs.able.gaugeInfrastructure.GaugeControl createGauge(edu.cmu.cs.able.gaugeInfrastructure.util.GaugeID gauge,
                                                                    edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector setupParams,
                                                                    edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector mappings)
Creates a new gauge as a separate process.
Overrides:
createGauge in class edu.cmu.cs.able.gaugeInfrastructure.Siena.SienaGaugeMgr
Parameters:
gauge - The ID of the gauge to create.
setupParams - The setup parameters to pass to the new gauge.
mappings - The mappings to pass to the new gauge.
Returns:
A "dummy" gauge control that has the new ID.

deleteGauge

public boolean deleteGauge(edu.cmu.cs.able.gaugeInfrastructure.GaugeControl gauge)
Deletes the gauge process associated with the gauge ID.
Overrides:
deleteGauge in class edu.cmu.cs.able.gaugeInfrastructure.Siena.SienaGaugeMgr
Parameters:
gauge - The gauge to be deleted.
Returns:
Whether the process was destroyed successfully.

managesType

public boolean managesType(java.lang.String gaugeType)
Returns true if the gauge type is edu.cmu.cs.able.gauges.Siena.SienaBandwidthGauge
Overrides:
managesType in class edu.cmu.cs.able.gaugeInfrastructure.Siena.SienaGaugeMgr
Parameters:
gaugeType -  
Returns:
 

queryMetaInfo

public boolean queryMetaInfo(java.lang.String gaugeType,
                             edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector configParamsMeta,
                             edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector valuesMeta)
Returns the parameters that can be used to configure the gauge, as well as the values reported by the gauge, for a particular gauge type.
Overrides:
queryMetaInfo in class edu.cmu.cs.able.gaugeInfrastructure.Siena.SienaGaugeMgr
Parameters:
gaugeType - The type of the gauge about which to get information.
configParamsMeta - Will fill this vector with [("Frequency", "int")]
valuesMeta - Will fill this vector with [("bandwidth", "float")]
Returns:
 

run

public void run()
Implements the run method for threads. This method (if gauge stderr and stdin are being tracked) will periodically output the values to stdout of the gauge manager.
Specified by:
run in interface java.lang.Runnable

main

public static void main(java.lang.String[] args)
A way to start the gauge manager from the command line.
Parameters:
args - -senp siena port
[-debug] [-silent]
-debug indicates whether debugging information should be displayed
-silent indicates whether the gauge outputs should be tracked.

printUsageMessage

public static void printUsageMessage()
Prints the usage message.