KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > ubik > rmi > naming > ServiceHandler


1 package org.sapia.ubik.rmi.naming;
2
3 import java.util.Map JavaDoc;
4
5 import javax.naming.NameNotFoundException JavaDoc;
6 import javax.naming.NamingException JavaDoc;
7
8
9 /**
10  * An instance of this class performs lookups on behalf of
11  * the <code>ServiceLocator</code>.
12  *
13  * @see ServiceLocator
14  * @author Yanick Duchesne
15  * <dl>
16  * <dt><b>Copyright:</b><dd>Copyright &#169; 2002-2003 <a HREF="http://www.sapia-oss.org">Sapia Open Source Software</a>. All Rights Reserved.</dd></dt>
17  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
18  * <a HREF="http://www.sapia-oss.org/license.html">license page</a> at the Sapia OSS web site</dd></dt>
19  * </dl>
20  */

21 public interface ServiceHandler {
22   /**
23    * Handles the lookup for the given path, given the host and port.
24    *
25    * @param host the host to look up.
26    * @param port the port on which to connect. If the port corresponds to
27    * the <code>UNDEFINED_PORT</code> constant, it means that the caller has
28    * not specified any port (a necessary feature in order to support well-known
29    * ports).
30    * @param path the path of the object to look up.
31    * @param attributes a <code>Map</code> of attributes - the latter correspond to the
32    * query string parameters that is parsed out of the URL that is specified to the
33    * <code>ServiceLocator</code>.
34    *
35    * @return an <code>Object</code>
36    * @throws NameNotFoundException if no object could be found for the
37    * given path.
38    * @throws NamingException if an error occurs while performing the lookup.
39    */

40   public Object JavaDoc handleLookup(String JavaDoc host, int port, String JavaDoc path, Map JavaDoc attributes)
41     throws NameNotFoundException JavaDoc, NamingException JavaDoc;
42 }
43
Popular Tags