KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > naming > Binder


1 /***
2  * Objectweb naming framework API
3  * Copyright (C) 2001-2002 France Telecom
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Contact: architecture@objectweb.org
20  */

21
22 package org.objectweb.naming;
23
24 /**
25  * A binder is a {@link NamingContext} that can also give access
26  * to the objects designated by the names it manages.
27  */

28
29 public interface Binder extends NamingContext {
30
31   /**
32    * Returns an object that gives access to the object designated by the given
33    * name. This name must belong to this naming context, i.e.,
34    * <tt>nc.bind(n, hints)</tt> is valid only if <tt>n.getNamingContext() ==
35    * nc</tt>. The object returned by this method implements the Java interface
36    * of the designated object. It may also implement the {@link Name}
37    * interface. This method creates a binding object (or a binding component
38    * when it is used with the <a HREF="http://www.objectweb.org/fractal">Fractal
39    * framework</a>) that gives access to the designated object (this binding
40    * object can be empty, i.e., the bind method may directly return the
41    * designated object itself).
42    *
43    * @param n a name that has been created by this naming context.
44    * @param hints optional additional information.
45    * @return an object that gives access to the object designated by <tt>n</tt>.
46    * This object may also implement the {@link Name} interface.
47    * @throws NamingException if the binding fails (this is the case, for
48    * example, if the given name was not created by this naming context).
49    */

50
51   Object JavaDoc bind (Name n, Object JavaDoc hints) throws NamingException;
52 }
53
Popular Tags