edu.cmu.cs.able.probes.RemosProbe
Class ProbeManagerHandle

java.lang.Object
  |
  +--edu.cmu.cs.able.probes.RemosProbe.ProbeManagerHandle
All Implemented Interfaces:
siena.Notifiable

public class ProbeManagerHandle
extends java.lang.Object
implements siena.Notifiable

ProbeManagerHandle provides the interface for application to operate on the probes, such as deploy, activate, focus, undeploy, etc.


Constructor Summary
ProbeManagerHandle(BandwidthProbeConsumer pc, java.lang.String pmName, java.lang.String sienaSetup)
          Initialize a new handle.
 
Method Summary
 void debugln(java.lang.String s)
          Print out some debugging message for user.
 ProbeHandle deploy()
          Deploy a new RemosProbe, that is, create a remos probe that is ready to monitor bandwidth information for application.
 void notify(siena.Notification e)
          Siena notify function.
 void notify(siena.Notification[] es)
          Siena notify function.
 void onFail(siena.Notification e)
          Deal with Fail message from RemosProbe, basically, what it does is to print out the message and tell user something is wrong.
 boolean undeploy(ProbeHandle prbHdl)
          Undeploy some probe.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProbeManagerHandle

public ProbeManagerHandle(BandwidthProbeConsumer pc,
                          java.lang.String pmName,
                          java.lang.String sienaSetup)
Initialize a new handle.
Parameters:
pc - the reference to the application class who calls this method
pmName - name for ProbeManager provided by applicaton
sienaSetup - the siena setup information. This actually comes from command line parameter, and is about siena server address.
Method Detail

deploy

public ProbeHandle deploy()
Deploy a new RemosProbe, that is, create a remos probe that is ready to monitor bandwidth information for application.
Returns:
the probe handle that refer to the new probe deployed

undeploy

public boolean undeploy(ProbeHandle prbHdl)
Undeploy some probe. That is, stop the monitoring and release the probe object.
Parameters:
prbHdl - the handle of the probe to be undeployed
Returns:
true/false to denote whether we succeed in the undeployment

onFail

public void onFail(siena.Notification e)
Deal with Fail message from RemosProbe, basically, what it does is to print out the message and tell user something is wrong.
Parameters:
e - the siena event notification about the failure message.

notify

public void notify(siena.Notification e)
Siena notify function.
Specified by:
notify in interface siena.Notifiable
Parameters:
e - refer to siena document to know the detail

notify

public void notify(siena.Notification[] es)
Siena notify function.
Specified by:
notify in interface siena.Notifiable
Parameters:
es - refer to siena document to know the detail

debugln

public void debugln(java.lang.String s)
Print out some debugging message for user.
Parameters:
s - debugging message