GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members  

Monitorable.java

Go to the documentation of this file.
00001 package org.gridlab.gat.monitoring;
00002 
00003 import java.util.List;
00004 
00005 import org.gridlab.gat.net.RemoteException;
00006 
00007 /**
00008  * Interface which is to be implemented by any classes which are capable of being 
00009  * monitored.
00010  */
00011 public interface Monitorable {
00012    /**
00013     * This method adds the passed instance of a MetricListener to the list
00014     * of MetricListeners which are notified of MetricEvents by an
00015     * instance of this class. The passed MetricListener is only notified of
00016     * MetricEvents which correspond to Metric instance passed to this
00017     * method.
00018     *
00019     * @param metricListener The MetricListener to notify of MetricEvents
00020     * @param metric The Metric corresponding to the MetricEvents for which the passed 
00021     * MetricListener will be notified
00022     * @throws java.rmi.RemoteException Thrown upon problems accessing the remote 
00023     * instance 
00024     */
00025     public void addMetricListener(MetricListener metricListener, Metric metric)
00026     throws RemoteException;
00027     
00028    /**
00029     * Removes the passed MetricListener from the java.util.List of MetricListeners
00030     * which are notified of MetricEvents corresponding to the passed
00031     * Metric instance. 
00032     *
00033     * @param metricListener The MetricListener to notify of MetricEvents
00034     * @param metric The Metric corresponding to the MetricEvents for which the passed 
00035     * MetricListener has been notified
00036     * @throws java.rmi.RemoteException Thrown upon problems accessing the remote 
00037     * instance
00038     */
00039     public void removeMetricListener(MetricListener metricListener, Metric metric)
00040     throws RemoteException;
00041     
00042    /**
00043     * This method returns a java.util.List of Metric instances. Each Metric instance
00044     * in this java.util.List is a Metric which can be monitored on this instance.  
00045     *
00046     * @return An java.util.List of Metric instances. Each Metric instance in this 
00047     * java.util.List is a Metric which can be monitored on this instance
00048     * @throws java.rmi.RemoteException Thrown upon problems accessing the remote 
00049     * instance
00050     */
00051     public List getMetrics() throws RemoteException;
00052 }