org.objectweb.carol.jndi.registry
Class CmiRegistryWrapperContext

java.lang.Object
  extended byorg.objectweb.carol.jndi.registry.AbsRegistryWrapperContext
      extended byorg.objectweb.carol.jndi.registry.CmiRegistryWrapperContext
All Implemented Interfaces:
javax.naming.Context

public class CmiRegistryWrapperContext
extends AbsRegistryWrapperContext
implements javax.naming.Context

Wrapper on a Registry object and implementing Context

Author:
Benoit Pelletier

Field Summary
 
Fields inherited from interface javax.naming.Context
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES
 
Constructor Summary
CmiRegistryWrapperContext(java.util.Hashtable env)
          Create a local context for the registry
 
Method Summary
 void bind(javax.naming.Name name, java.lang.Object obj)
          Binds a name to an object.
 java.lang.Object lookup(javax.naming.Name name)
          Retrieves the named object.
 void rebind(javax.naming.Name name, java.lang.Object obj)
          Binds a name to an object, overwriting any existing binding.
 void unbind(javax.naming.Name name)
          Unbinds the named object.
 
Methods inherited from class org.objectweb.carol.jndi.registry.AbsRegistryWrapperContext
addToEnvironment, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getEnvironment, getNameInNamespace, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookupLink, lookupLink, rebind, removeFromEnvironment, rename, rename, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.naming.Context
addToEnvironment, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getEnvironment, getNameInNamespace, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookupLink, lookupLink, rebind, removeFromEnvironment, rename, rename, unbind
 

Constructor Detail

CmiRegistryWrapperContext

public CmiRegistryWrapperContext(java.util.Hashtable env)
Create a local context for the registry

Parameters:
env - hashtable used
Method Detail

lookup

public java.lang.Object lookup(javax.naming.Name name)
                        throws javax.naming.NamingException
Retrieves the named object.

Specified by:
lookup in interface javax.naming.Context
Overrides:
lookup in class AbsRegistryWrapperContext
Parameters:
name - the name of the object to look up
Returns:
the object bound to name
Throws:
javax.naming.NamingException - if a naming exception is encountered

bind

public void bind(javax.naming.Name name,
                 java.lang.Object obj)
          throws javax.naming.NamingException
Binds a name to an object.

Specified by:
bind in interface javax.naming.Context
Overrides:
bind in class AbsRegistryWrapperContext
Parameters:
name - the name to bind; may not be empty
obj - the object to bind; possibly null
Throws:
javax.naming.NamingException - if a naming exception is encountered

rebind

public void rebind(javax.naming.Name name,
                   java.lang.Object obj)
            throws javax.naming.NamingException
Binds a name to an object, overwriting any existing binding. All intermediate contexts and the target context (that named by all but terminal atomic component of the name) must already exist.

Specified by:
rebind in interface javax.naming.Context
Overrides:
rebind in class AbsRegistryWrapperContext
Parameters:
name - the name to bind; may not be empty
obj - the object to bind; possibly null
Throws:
javax.naming.NamingException - if a naming exception is encountered

unbind

public void unbind(javax.naming.Name name)
            throws javax.naming.NamingException
Unbinds the named object. Removes the terminal atomic name in name from the target context--that named by all but the terminal atomic part of name.

Specified by:
unbind in interface javax.naming.Context
Overrides:
unbind in class AbsRegistryWrapperContext
Parameters:
name - the name to unbind; may not be empty
Throws:
javax.naming.NamingException - if a naming exception is encountered