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

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

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

ProbeManagerComm is a kind of server which sits on siena bus, listening the probe request message sent by ProbeManagerHandle, and behave accordingly.


Method Summary
 void debugln(java.lang.String s)
          Output debuggin message
static void main(java.lang.String[] args)
          Create an instance of ProbeManagerComm and starts listening on siena about the events that it is interested in.
 void notify(siena.Notification e)
          Siena notfication method
 void notify(siena.Notification[] es)
          Siena notfication method
 void onActivate(siena.Notification e)
          Used to activate a probe.
 void onDeploy(siena.Notification e)
          Process the deploy request from ProbeManagerHandle, create a probe and reply with probe name Message received from ProbeManageHandle should have the following format:
 void onFocus(siena.Notification e)
          Used to change the monitoring parameters of the probe
 void onUndeploy(siena.Notification e)
          Undeploy a probe
 void reportError(ProbeID prbID)
          Used to report probe execution error to application
 void sensed(ProbeID prbID, double bw)
          Report the probing value back to ProbeHandle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(java.lang.String[] args)
Create an instance of ProbeManagerComm and starts listening on siena about the events that it is interested in.

onDeploy

public void onDeploy(siena.Notification e)
Process the deploy request from ProbeManagerHandle, create a probe and reply with probe name Message received from ProbeManageHandle should have the following format:

o. "RemosProbe", "Deploy", "Request"

Here, "RemosProbe" is the ProbeType, all the siean message sent through siena bus should have this type, so as to differentiate with the messages sent by other types of probes; "Deploy" is the Action; and "Request" gives the message direction information, that is, indicating that the message is sent from ProbeManageHandle to the ProbeManangeComm.

The reply message should be one of the following two, according to whether or not the action is successful.

o. "RemosProbe", "Deploy", "Reply", "Succeed", "ProbeID"

o. "RemosProbe", "Deploy", "Reply", "Fail"

Parameters:
e - siena notification message

onUndeploy

public void onUndeploy(siena.Notification e)
Undeploy a probe
Parameters:
e - siean notification message

onActivate

public void onActivate(siena.Notification e)
Used to activate a probe.
Parameters:
e - siena notification message

onFocus

public void onFocus(siena.Notification e)
Used to change the monitoring parameters of the probe
Parameters:
e - siena notification message

sensed

public void sensed(ProbeID prbID,
                   double bw)
Report the probing value back to ProbeHandle
Parameters:
prbID - the ID of the probe that reports this value
bw - the available bandwidth from the probe

notify

public void notify(siena.Notification e)
Siena notfication method
Specified by:
notify in interface siena.Notifiable
Parameters:
e - siena notification message

notify

public void notify(siena.Notification[] es)
Siena notfication method
Specified by:
notify in interface siena.Notifiable
Parameters:
es - siena notification message

reportError

public void reportError(ProbeID prbID)
Used to report probe execution error to application
Parameters:
prbID - ID of the probe that create the error

debugln

public void debugln(java.lang.String s)
Output debuggin message
Parameters:
s - debuggin message