|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.scand.jndi.registry.RegistryContext
Context implementation.
| 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 | |
protected |
RegistryContext(java.util.Hashtable environment)
|
protected |
RegistryContext(java.util.Hashtable environment,
com.scand.registry.RegistryKey registryKey)
|
| Method Summary | |
java.lang.Object |
addToEnvironment(java.lang.String propName,
java.lang.Object propVal)
Adds a new environment property to the environment of this context. |
void |
bind(javax.naming.Name name,
java.lang.Object obj)
Binds a name to an object. |
void |
bind(java.lang.String name,
java.lang.Object obj)
Binds a name to an object. |
void |
close()
Closes this context. |
javax.naming.Name |
composeName(javax.naming.Name name,
javax.naming.Name prefix)
Composes the name of this context with a name relative to this context. |
java.lang.String |
composeName(java.lang.String name,
java.lang.String prefix)
Composes the name of this context with a name relative to this context. |
javax.naming.Context |
createSubcontext(javax.naming.Name name)
Creates and binds a new context (registry key). |
javax.naming.Context |
createSubcontext(java.lang.String name)
Creates and binds a new context (registry key). |
void |
destroySubcontext(javax.naming.Name name)
Destroys the named context (registry key) and removes it from the namespace (registry). |
void |
destroySubcontext(java.lang.String name)
Destroys the named context (registry key) and removes it from the namespace (registry). |
java.util.Hashtable |
getEnvironment()
Retrieves the environment in effect for this context. |
java.lang.String |
getNameInNamespace()
Retrieves the full name of this context within its own namespace. |
javax.naming.NameParser |
getNameParser(javax.naming.Name name)
Retrieves the parser associated with the named context. |
javax.naming.NameParser |
getNameParser(java.lang.String name)
Retrieves the parser associated with the named context. |
javax.naming.NamingEnumeration |
list(javax.naming.Name name)
Enumerates the names bound in the named context, along with the class names of objects bound to them. |
javax.naming.NamingEnumeration |
list(java.lang.String name)
Enumerates the names bound in the named context, along with the class names of objects bound to them. |
javax.naming.NamingEnumeration |
listBindings(javax.naming.Name name)
Enumerates the names bound in the named context, along with the objects bound to them. |
javax.naming.NamingEnumeration |
listBindings(java.lang.String name)
Enumerates the names bound in the named context, along with the objects bound to them. |
java.lang.Object |
lookup(javax.naming.Name name)
Retrieves the named object. |
java.lang.Object |
lookup(java.lang.String name)
Retrieves the named object. |
java.lang.Object |
lookupLink(javax.naming.Name name)
The same as lookup(Name). |
java.lang.Object |
lookupLink(java.lang.String name)
The same as lookup(String). |
void |
rebind(javax.naming.Name name,
java.lang.Object obj)
Binds a name to an object, overwriting any existing binding. |
void |
rebind(java.lang.String name,
java.lang.Object obj)
Binds a name to an object, overwriting any existing binding. |
java.lang.Object |
removeFromEnvironment(java.lang.String propName)
Removes an environment property from the environment of this context. |
void |
rename(javax.naming.Name oldName,
javax.naming.Name newName)
Binds a new name to the object bound to an old name, and unbinds the old name. |
void |
rename(java.lang.String oldName,
java.lang.String newName)
Binds a new name to the object bound to an old name, and unbinds the old name. |
java.lang.String |
toString()
Returns a string representation of the object. |
void |
unbind(javax.naming.Name name)
Unbinds the named object. |
void |
unbind(java.lang.String name)
Unbinds the named object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected RegistryContext(java.util.Hashtable environment)
protected RegistryContext(java.util.Hashtable environment,
com.scand.registry.RegistryKey registryKey)
| Method Detail |
public java.lang.Object addToEnvironment(java.lang.String propName,
java.lang.Object propVal)
throws javax.naming.NamingException
addToEnvironment in interface javax.naming.ContextpropName - The name of the environment property to add; may not be null.propVal - The value of the property to add; may not be null.
javax.naming.NamingException - if a naming exception is encountered.getEnvironment(),
removeFromEnvironment(String)
public void bind(javax.naming.Name name,
java.lang.Object obj)
throws javax.naming.NamingException
bind in interface javax.naming.Contextname - The name to bind; may not be empty.obj - The object to bind; can be null only if parameter name is not entry name.
javax.naming.NameAlreadyBoundException - if name is already bound.
javax.naming.NamingException - if a naming exception is encountered.bind(String, Object),
rebind(Name, Object)
public void bind(java.lang.String name,
java.lang.Object obj)
throws javax.naming.NamingException
bind(Name, Object) for details.
bind in interface javax.naming.Contextname - The name to bind; may not be empty.obj - The object to bind; can be null only if parameter name is not entry name (names a key).
javax.naming.NameAlreadyBoundException - if name is already bound.
javax.naming.NamingException - if a naming exception is encountered.
public void close()
throws javax.naming.NamingException
This method is idempotent: invoking it on a context that has already been closed has no effect. Invoking any other method on a closed context is not allowed, and results in undefined behaviour.
close in interface javax.naming.Contextjavax.naming.NamingException - if a naming exception is encountered.
public javax.naming.Name composeName(javax.naming.Name name,
javax.naming.Name prefix)
throws javax.naming.NamingException
name) relative to this context, and
the name (prefix) of this context relative to one
of its ancestors, this method returns the composition of the
two names using the syntax appropriate for the naming
system involved. That is, if name names an
object relative to this context, the result is the name of the
same object, but relative to the ancestor context. None of the
names may be null.
For example
composeName("My Company", "HKCU\\Software")
will return "HKCU\\Software\\My Company".
composeName in interface javax.naming.Contextname - A name relative to this context.prefix - The name of this context relative to one of its ancestors.
prefix and name.
javax.naming.NamingException - if a naming exception is encountered.composeName(String, String)
public java.lang.String composeName(java.lang.String name,
java.lang.String prefix)
throws javax.naming.NamingException
composeName(Name, Name) for details.
composeName in interface javax.naming.Contextname - A name relative to this context.prefix - The name of this context relative to one of its ancestors.
prefix and name.
javax.naming.NamingException - if a naming exception is encountered.
public javax.naming.Context createSubcontext(javax.naming.Name name)
throws javax.naming.NamingException
createSubcontext in interface javax.naming.Contextname - The name of the context to create; may not be empty.
javax.naming.NameAlreadyBoundException - if name is already bound.
javax.naming.NamingException - if a naming exception is encountered.createSubcontext(String)
public javax.naming.Context createSubcontext(java.lang.String name)
throws javax.naming.NamingException
createSubcontext(Name) for details.
createSubcontext in interface javax.naming.Contextname - The name of the context to create; may not be empty.
javax.naming.NameAlreadyBoundException - if name is already bound.
javax.naming.NamingException - if a naming exception is encountered.
public void destroySubcontext(javax.naming.Name name)
throws javax.naming.NamingException
This method is idempotent. It succeeds even if the terminal atomic name is not bound in the target context, but throws NameNotFoundException if any of the intermediate contexts do not exist.
destroySubcontext in interface javax.naming.Contextname - The name of the context to be destroyed; may not be empty.
javax.naming.NameNotFoundException - if an intermediate context does not exist.
javax.naming.NotContextException - if the name is bound but does not name a
context, or does not name a context of the appropriate type.
javax.naming.ContextNotEmptyException - if the named context is not empty.
javax.naming.NamingException - if a naming exception is encountered.destroySubcontext(String)
public void destroySubcontext(java.lang.String name)
throws javax.naming.NamingException
destroySubcontext(javax.naming.Name) for details.
destroySubcontext in interface javax.naming.Contextname - The name of the context to be destroyed; may not be empty.
javax.naming.NameNotFoundException - if an intermediate context does not exist.
javax.naming.NotContextException - if the name is bound but does not name a
context, or does not name a context of the appropriate type.
javax.naming.ContextNotEmptyException - if the named context is not empty.
javax.naming.NamingException - if a naming exception is encountered.
public java.util.Hashtable getEnvironment()
throws javax.naming.NamingException
The caller should not make any changes to the object returned: their effect on the context is undefined. The environment of this context may be changed using addToEnvironment() and removeFromEnvironment().
getEnvironment in interface javax.naming.Contextjavax.naming.NamingException - if a naming exception is encounteredaddToEnvironment(String, Object),
removeFromEnvironment(String)
public java.lang.String getNameInNamespace()
throws javax.naming.NamingException
getNameInNamespace in interface javax.naming.Contextjavax.naming.NamingException - if a naming exception is encountered.
public javax.naming.NameParser getNameParser(javax.naming.Name name)
throws javax.naming.NamingException
getNameParser in interface javax.naming.Contextname - The name of the context from which to get the parser.
javax.naming.NamingException - if a naming exception is encountered.getNameParser(String),
CompoundName
public javax.naming.NameParser getNameParser(java.lang.String name)
throws javax.naming.NamingException
getNameParser(Name) for details.
getNameParser in interface javax.naming.Contextname - The name of the context from which to get the parser.
javax.naming.NamingException - if a naming exception is encountered.
public javax.naming.NamingEnumeration list(javax.naming.Name name)
throws javax.naming.NamingException
If a binding is added to or removed from this context, its effect on an enumeration previously returned is undefined.
list in interface javax.naming.Contextname - The name of the context to list.
javax.naming.NamingException - if a naming exception is encountered.list(String),
listBindings(Name),
NameClassPair
public javax.naming.NamingEnumeration list(java.lang.String name)
throws javax.naming.NamingException
list(Name) for details.
list in interface javax.naming.Contextname - The name of the context to list.
javax.naming.NamingException - if a naming exception is encountered.
public javax.naming.NamingEnumeration listBindings(javax.naming.Name name)
throws javax.naming.NamingException
If a binding is added to or removed from this context, its effect on an enumeration previously returned is undefined.
listBindings in interface javax.naming.Contextname - The name of the context to list.
javax.naming.NamingException - if a naming exception is encountered.listBindings(String),
list(Name),
Binding
public javax.naming.NamingEnumeration listBindings(java.lang.String name)
throws javax.naming.NamingException
listBindings(Name) for details.
listBindings in interface javax.naming.Contextname - The name of the context to list.
javax.naming.NamingException - if a naming exception is encountered.
public java.lang.Object lookup(javax.naming.Name name)
throws javax.naming.NamingException
lookup in interface javax.naming.Contextname - The name of the object to look up.
javax.naming.NameNotFoundException - if name is not found in the registry.
javax.naming.NamingException - if a naming exception is encountered.lookup(String),
lookupLink(Name)
public java.lang.Object lookup(java.lang.String name)
throws javax.naming.NamingException
lookup(Name) for details.
lookup in interface javax.naming.Contextname - The name of the object to look up.
javax.naming.NamingException - if a naming exception is encountered.
public java.lang.Object lookupLink(javax.naming.Name name)
throws javax.naming.NamingException
lookup(Name).
lookupLink in interface javax.naming.Contextname - the name of the object to look up
javax.naming.NamingException - if a naming exception is encounteredContext.lookupLink(String)
public java.lang.Object lookupLink(java.lang.String name)
throws javax.naming.NamingException
lookup(String).
lookupLink in interface javax.naming.Contextname - the name of the object to look up
javax.naming.NamingException - if a naming exception is encountered
public void rebind(javax.naming.Name name,
java.lang.Object obj)
throws javax.naming.NamingException
rebind in interface javax.naming.Contextname - The name to bind; may not be empty.obj - the object to bind; can be null only if parameter name is not entry name.
javax.naming.NamingException - if a naming exception is encountered.rebind(String, Object),
bind(Name, Object)
public void rebind(java.lang.String name,
java.lang.Object obj)
throws javax.naming.NamingException
rebind(Name, Object) for details.
rebind in interface javax.naming.Contextname - The name to bind; may not be empty.obj - The object to bind; can be null only if parameter name is not entry name.
javax.naming.NamingException - if a naming exception is encountered.
public java.lang.Object removeFromEnvironment(java.lang.String propName)
throws javax.naming.NamingException
removeFromEnvironment in interface javax.naming.ContextpropName - The name of the environment property to remove; may not be null.
javax.naming.NamingException - if a naming exception is encountered.getEnvironment(),
addToEnvironment(String, Object)
public void rename(javax.naming.Name oldName,
javax.naming.Name newName)
throws javax.naming.NamingException
rename in interface javax.naming.ContextoldName - The name of the existing binding; may not be empty.newName - The name of the new binding; may not be empty.
javax.naming.NameAlreadyBoundException - if newName is already bound.
javax.naming.NamingException - if a naming exception is encountered.rename(String, String),
bind(Name, Object),
rebind(Name, Object)
public void rename(java.lang.String oldName,
java.lang.String newName)
throws javax.naming.NamingException
rename(Name, Name) for details.
rename in interface javax.naming.ContextoldName - The name of the existing binding; may not be empty.newName - The name of the new binding; may not be empty.
javax.naming.NameAlreadyBoundException - if newName is already bound.
javax.naming.NamingException - if a naming exception is encountered.public java.lang.String toString()
java.lang.ObjecttoString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
public void unbind(javax.naming.Name name)
throws javax.naming.NamingException
name
from the target context--that named by all but the terminal
atomic part of name.
If "com.scand.jndi.registry.entryPrefix" is set to "" then the method unbinds an entry.
If "com.scand.jndi.registry.entryPrefix" is set to non-empty string
then the method unbinds an entry if terminal atomic component
of the name starts with the value of "com.scand.jndi.registry.entryPrefix",
otherwise the method unbinds a key.
This method is idempotent. It succeeds even if the terminal atomic name is not bound in the target context, but throws NameNotFoundException if any of the intermediate contexts do not exist. Intermediate contexts are not changed.
unbind in interface javax.naming.Contextname - The name to unbind; may not be empty.
javax.naming.NameNotFoundException - if an intermediate context does not exist.
javax.naming.NamingException - if a naming exception is encountered.unbind(String)
public void unbind(java.lang.String name)
throws javax.naming.NamingException
unbind(javax.naming.Name) for details.
unbind in interface javax.naming.Contextname - The name to unbind; may not be empty.
javax.naming.NameNotFoundException - if an intermediate context does not exist.
javax.naming.NamingException - if a naming exception is encountered.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||