org.ourgrid.common.fd
Interface Monitor

All Known Implementing Classes:
AbstractFailureDetector, CorePeerFailureDetector, FakeFailureDetector, MyGridFailureDetector, PeerFailureDetector, SimpleTestFailureDetector, UserAgentFailureDetector

public interface Monitor

Objects that implement this interface are responsible for monitoring Grid Machines and providing an updated information about their states.


Method Summary
 java.util.Map<java.lang.String,MonitoringUnit> getMonitorables()
          Retrieves a collection of monitorables
 void register(Notifiable notifiable, java.lang.String monitorableAddress)
          Adds an object interested in receiving Grid Machine state changes notifications of the specified Grid Machine.
 void startMonitoring()
          Starts monitoring Grid Machines.
 void unregister(Notifiable notifiable)
          Removes the object interested in receiving Grid Machine state changes notifications of all monitorables interested list.
 void unregister(Notifiable notifiable, java.lang.String monitorableAddress)
          Removes the object interested in receiving Grid Machine state changes notifications.
 

Method Detail

register

void register(Notifiable notifiable,
              java.lang.String monitorableAddress)
              throws java.rmi.RemoteException,
                     java.net.MalformedURLException
Adds an object interested in receiving Grid Machine state changes notifications of the specified Grid Machine.

Parameters:
notifiable - object interested in receiving the notifications
monitorableAddress - the address of the service (FailureDetector .. Monitorable) to monitor
Throws:
java.rmi.RemoteException - if anything wrong occurs in communication.
java.net.MalformedURLException

unregister

void unregister(Notifiable notifiable,
                java.lang.String monitorableAddress)
                throws java.rmi.RemoteException
Removes the object interested in receiving Grid Machine state changes notifications.

Parameters:
notifiable - the object to be removed
monitorableAddress - the Monitorable address that the Notifiable will not be interested.
Throws:
java.rmi.RemoteException - if anything wrong occurs in communication.

unregister

void unregister(Notifiable notifiable)
                throws java.rmi.RemoteException
Removes the object interested in receiving Grid Machine state changes notifications of all monitorables interested list.

Parameters:
notifiable - the object to be removed
Throws:
java.rmi.RemoteException - if anything wrong occurs in communication.

startMonitoring

void startMonitoring()
                     throws java.rmi.RemoteException
Starts monitoring Grid Machines.

Throws:
java.rmi.RemoteException - if anything wrong occurs in communication.

getMonitorables

java.util.Map<java.lang.String,MonitoringUnit> getMonitorables()
                                                               throws java.rmi.RemoteException
Retrieves a collection of monitorables

Returns:
The entities to be monitored
Throws:
java.rmi.RemoteException - If anything wrong occurs in communication.