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

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

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

ProbeHandle is provided for user application to refer to the probe deployed by the application. After a probe is created, user application can use the probe handle to communicate with Probe through ProbeManagerComm and does not need to user ProbeManagerHandle again.


Method Summary
 boolean activate(java.net.InetAddress srcIP, java.net.InetAddress dstIP, double frequency)
          Activate a probe, make it start monitoring
 boolean focus(java.net.InetAddress srcIP, java.net.InetAddress dstIP, double frequency)
          Change the monitoring parameters setting for the probe.
 java.lang.String getID()
          Get the probe ID.
 void notify(siena.Notification e)
          Siena notification function.
 void notify(siena.Notification[] es)
          Siena notification function.
 void onSensed(siena.Notification e)
          Accept the report value from the probe monitoring
 void query()
          Not implemented
 java.lang.String toString()
          Get a string to indicate the probe ID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

activate

public boolean activate(java.net.InetAddress srcIP,
                        java.net.InetAddress dstIP,
                        double frequency)
Activate a probe, make it start monitoring
Parameters:
srcIP - IP address of the source node of the network link
dstIP - IP address of the destination node of the network link
frequency - monitoring frequency
Returns:
true/false, to indicate whether the operation has succeeded

focus

public boolean focus(java.net.InetAddress srcIP,
                     java.net.InetAddress dstIP,
                     double frequency)
Change the monitoring parameters setting for the probe. In current implementation, it has the same semantics with activate()
Parameters:
srcIP - IP address of the source node of the network link
dstIP - IP address of the destination node of the network link
frequency - monitoring frequency
Returns:
true/false, to indicate whether the operation has succeeded

query

public void query()
Not implemented

onSensed

public void onSensed(siena.Notification e)
Accept the report value from the probe monitoring
Parameters:
e - the siena event that includes the report value

notify

public void notify(siena.Notification e)
Siena notification function.
Specified by:
notify in interface siena.Notifiable
Parameters:
e - siena event

notify

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

toString

public java.lang.String toString()
Get a string to indicate the probe ID.
Overrides:
toString in class java.lang.Object
Returns:
return a string which include the probe ID string

getID

public java.lang.String getID()
Get the probe ID. Similar with toString(), but toString() has a prefix string to make it a LITTLE bit understandable.
Returns:
return the probe ID string.