org.objectweb.naming

Interface Binder

All Superinterfaces:
NamingContext

public interface Binder
extends NamingContext

A binder is a NamingContext that can also give access to the objects designated by the names it manages.

Method Summary

Object
bind(Name n, Object hints)
Returns an object that gives access to the object designated by the given name.

Methods inherited from interface org.objectweb.naming.NamingContext

decode, export

Method Details

bind

public Object bind(Name n,
                   Object hints)
            throws NamingException
Returns an object that gives access to the object designated by the given name. This name must belong to this naming context, i.e., nc.bind(n, hints) is valid only if n.getNamingContext() == nc. The object returned by this method implements the Java interface of the designated object. It may also implement the Name interface. This method creates a binding object (or a binding component when it is used with the Fractal framework) that gives access to the designated object (this binding object can be empty, i.e., the bind method may directly return the designated object itself).

Parameters:
n - a name that has been created by this naming context.
hints - optional additional information.

Returns:
an object that gives access to the object designated by n. This object may also implement the Name interface.

Throws:
NamingException - if the binding fails (this is the case, for example, if the given name was not created by this naming context).