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  

AdvertService.java

Go to the documentation of this file.
00001 /*
00002  * Created on Apr 19, 2004
00003  */
00004 package org.gridlab.gat.advert;
00005 
00006 import java.util.List;
00007 import java.util.Map;
00008 import java.util.NoSuchElementException;
00009 
00010 import org.gridlab.gat.GATContext;
00011 import org.gridlab.gat.Preferences;
00012 import org.gridlab.gat.monitoring.Metric;
00013 import org.gridlab.gat.monitoring.MetricListener;
00014 import org.gridlab.gat.monitoring.Monitorable;
00015 import org.gridlab.gat.net.RemoteException;
00016 
00017 /**
00018  * @author rob
00019  *
00020  * The GATAdvertService allows GATAdvertisable
00021  * instances to get published to and queried in an
00022  * advert directory.  Such an advert directory is a meta data
00023  * directory with an hierarchical namespace attached.   
00024  */
00025 public class AdvertService implements Monitorable {
00026 
00027     /**
00028      * Create an instance of the AdvertService.
00029      * @param gatContext The context to use.
00030      */
00031     public AdvertService(GATContext gatContext) {
00032         
00033     }
00034 
00035     /**
00036      * Create an instance of the AdvertService using the provided preference.
00037      * @param gatContext The context to use.
00038      * @param preferences The user preferences.
00039      */
00040     public AdvertService(GATContext gatContext, Preferences preferences) {
00041         
00042     }
00043            
00044     /**
00045      * Add an Advertizable instance and related meta data to
00046      * the GATAdvertService, at path (absolute or relative to PWD).  If
00047      * an GATAdvertService entry exists at the specified path, that
00048      * entry gets overwritten, and a warning is issued.
00049      * 
00050      * @param Advert instance to be entered into the GATAdvertService.
00051      * @param metaData Meta data to be associated with the passed GATAdvertiseable.
00052      * @param path Path (either absolute or relative to PWD) of the new entry.
00053      */
00054     public void add(Advertisable advert, Map metaData, String path) {
00055         
00056     }
00057     
00058     /**
00059      * Remove an Advertizable instance and related meta data from
00060      * the GATAdvertService, at path (absolute or relative to PWD).  If
00061      * 
00062      * @param path Path (either absolute or relative to PWD) of the entry to be deleted.
00063      * @throws NoSuchElementException The path is incorrect.
00064      */
00065     public void delete(String path) throws NoSuchElementException {
00066         
00067     }
00068     
00069     /**
00070      * @param path Path (either absolute or relative to PWD) of the entry.
00071      * @return A map containing the metadata.
00072      * @throws NoSuchElementException The path is incorrect.
00073      */
00074     public Map getMetaData(String path) throws NoSuchElementException {
00075         return null;
00076     }
00077 
00078     /**
00079      * Query the GATAdvertService for entries matching the specified set
00080      * of meta data. The returned paths can be destroyed at any time.
00081      * @param metaData Meta data describing the entries to be searched for.
00082      * @return Paths, each pointing to a matching entry. If no mathces are found,
00083      * null is returned.
00084      */
00085     public String[] find(Map metaData) {
00086         return null;
00087     }
00088     
00089     /**
00090      * Specify the element of the GATAdvertService namespace to be used
00091      * as reference for relative paths.
00092      * @param path New absolute or relative reference path.
00093      */
00094     public void setPWD(String path) {
00095         
00096     }
00097     
00098     /**
00099      * Returns the current element of the GATAdvertService namespace
00100      * used as reference for relative paths.
00101      * @return Absolute reference path.
00102      */
00103     public String getPWD() {
00104         return null;
00105     }
00106  
00107     public void addMetricListener(MetricListener metricListener, Metric metric)
00108     throws RemoteException {
00109 
00110     }
00111 
00112     public void removeMetricListener(MetricListener metricListener, Metric metric)
00113     throws RemoteException {
00114         
00115     }
00116 
00117     public List getMetrics() throws RemoteException {
00118         return null;
00119     }
00120 }