|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--org.apache.avalon.excalibur.naming.AbstractContext
Abstract JNDI Context that can be inherited from to provide a particular type of Context.
| Field Summary | |
protected java.util.Hashtable |
m_environment
|
| 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 | |
AbstractContext()
|
|
AbstractContext(java.util.Hashtable environment)
|
|
| Method Summary | |
java.lang.Object |
addToEnvironment(java.lang.String key,
java.lang.Object value)
Add a key-value pair to environment |
void |
bind(javax.naming.Name name,
java.lang.Object object)
Bind an object to a name. |
protected abstract void |
bind(javax.naming.Name name,
java.lang.Object object,
boolean rebind)
Helper method to bind |
void |
bind(java.lang.String name,
java.lang.Object object)
Bind an object to a name. |
void |
close()
Release resources associated with context. |
javax.naming.Name |
composeName(javax.naming.Name name,
javax.naming.Name prefix)
Compose a name form a name and a prefix. |
java.lang.String |
composeName(java.lang.String name,
java.lang.String prefix)
Compose a name form a name and a prefix. |
javax.naming.Context |
createSubcontext(java.lang.String name)
Create a Subcontext. |
void |
destroySubcontext(java.lang.String name)
Destroy a Subcontext. |
java.util.Hashtable |
getEnvironment()
Return a copy of environment. |
protected javax.naming.Name |
getLeafName(javax.naming.Name name)
Get leaf name component from specified Name object. |
protected abstract javax.naming.NameParser |
getNameParser()
|
javax.naming.NameParser |
getNameParser(javax.naming.Name name)
Get the NameParser for the named context. |
javax.naming.NameParser |
getNameParser(java.lang.String name)
Get the NameParser for the named context. |
protected javax.naming.Name |
getPathName(javax.naming.Name name)
Get name components minus leaf name component. |
protected boolean |
isSelf(javax.naming.Name name)
|
javax.naming.NamingEnumeration |
list(java.lang.String 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(java.lang.String name)
Get the object named. |
java.lang.Object |
lookupLink(javax.naming.Name name)
Get the object named following all links. |
java.lang.Object |
lookupLink(java.lang.String name)
Get the object named following all links. |
void |
rebind(javax.naming.Name name,
java.lang.Object object)
Binds a name to an object, overwriting any existing binding. |
void |
rebind(java.lang.String name,
java.lang.Object object)
Binds a name to an object, overwriting any existing binding. |
java.lang.Object |
removeFromEnvironment(java.lang.String key)
Remove a key-value pair form environment and return it. |
void |
rename(javax.naming.Name oldName,
javax.naming.Name newName)
|
void |
rename(java.lang.String oldName,
java.lang.String newName)
Rename a already bound object |
void |
unbind(java.lang.String name)
Unbind a object from a name. |
| 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 |
createSubcontext, destroySubcontext, getNameInNamespace, list, listBindings, lookup, unbind |
| Field Detail |
protected java.util.Hashtable m_environment
| Constructor Detail |
public AbstractContext()
public AbstractContext(java.util.Hashtable environment)
| Method Detail |
protected abstract javax.naming.NameParser getNameParser()
throws javax.naming.NamingException
public java.lang.Object addToEnvironment(java.lang.String key,
java.lang.Object value)
throws javax.naming.NamingException
addToEnvironment in interface javax.naming.Contextkey - the keyvalue - the valuepublic void close()
close in interface javax.naming.Contextprotected boolean isSelf(javax.naming.Name name)
public void bind(java.lang.String name,
java.lang.Object object)
throws javax.naming.NamingException
bind in interface javax.naming.Contextname - the name to bind toobject - the objectjavax.naming.NamingException - if an error occurs such as bad name or invalid binding
public void bind(javax.naming.Name name,
java.lang.Object object)
throws javax.naming.NamingException
bind in interface javax.naming.Contextname - the name to bind toobject - the objectjavax.naming.NamingException - if an error occurs such as bad name or invalid binding
protected abstract void bind(javax.naming.Name name,
java.lang.Object object,
boolean rebind)
throws javax.naming.NamingException
public java.lang.String composeName(java.lang.String name,
java.lang.String prefix)
throws javax.naming.NamingException
composeName in interface javax.naming.Contextname - the nameprefix - the prefixjavax.naming.NamingException - if a badly formatted name for context
public javax.naming.Name composeName(javax.naming.Name name,
javax.naming.Name prefix)
throws javax.naming.NamingException
composeName in interface javax.naming.Contextname - the nameprefix - the prefixjavax.naming.NamingException - if a badly formatted name for context
public javax.naming.Context createSubcontext(java.lang.String name)
throws javax.naming.NamingException
createSubcontext in interface javax.naming.Contextname - the name of subcontextjavax.naming.NamingException - if an error occurs (ie context exists, badly formated name etc)
public void destroySubcontext(java.lang.String name)
throws javax.naming.NamingException
destroySubcontext in interface javax.naming.Contextname - the name of subcontext to destroyjavax.naming.NamingException - if an error occurs such as malformed name or
context not exiting or not empty
public java.util.Hashtable getEnvironment()
throws javax.naming.NamingException
getEnvironment in interface javax.naming.Context
public javax.naming.NameParser getNameParser(java.lang.String name)
throws javax.naming.NamingException
getNameParser in interface javax.naming.Contextname - javax.naming.NamingException - if an error occurs
public javax.naming.NameParser getNameParser(javax.naming.Name name)
throws javax.naming.NamingException
getNameParser in interface javax.naming.Contextname - javax.naming.NamingException - if an error occurs
public javax.naming.NamingEnumeration list(java.lang.String name)
throws javax.naming.NamingException
list in interface javax.naming.Contextname - the name of the contextjavax.naming.NamingException - if an error occurs
public javax.naming.NamingEnumeration listBindings(java.lang.String name)
throws javax.naming.NamingException
listBindings in interface javax.naming.Contextname - the name of the contextjavax.naming.NamingException - if an error occurs
public java.lang.Object lookup(java.lang.String name)
throws javax.naming.NamingException
lookup in interface javax.naming.Contextname - the namejavax.naming.NamingException - if an error occurs (ie object name is inavlid or unbound)
public java.lang.Object lookupLink(java.lang.String name)
throws javax.naming.NamingException
lookupLink in interface javax.naming.Contextname - the namejavax.naming.NamingException - if an error occurs (ie object name is inavlid or unbound)
public java.lang.Object lookupLink(javax.naming.Name name)
throws javax.naming.NamingException
lookupLink in interface javax.naming.Contextname - the namejavax.naming.NamingException - if an error occurs (ie object name is inavlid or unbound)
public void rebind(java.lang.String name,
java.lang.Object object)
throws javax.naming.NamingException
rebind in interface javax.naming.Contextname - the nameobject - the objectjavax.naming.NamingException - if an error occurs
public void rebind(javax.naming.Name name,
java.lang.Object object)
throws javax.naming.NamingException
rebind in interface javax.naming.Contextname - the nameobject - the objectjavax.naming.NamingException - if an error occurs
public java.lang.Object removeFromEnvironment(java.lang.String key)
throws javax.naming.NamingException
removeFromEnvironment in interface javax.naming.Contextkey - the key
public void rename(java.lang.String oldName,
java.lang.String newName)
throws javax.naming.NamingException
rename in interface javax.naming.ContextoldName - the old namenewName - the new namejavax.naming.NamingException - if an error occurs
public void rename(javax.naming.Name oldName,
javax.naming.Name newName)
throws javax.naming.NamingException
rename in interface javax.naming.Context
public void unbind(java.lang.String name)
throws javax.naming.NamingException
unbind in interface javax.naming.Contextname - the namejavax.naming.NamingException - if an error occurs
protected javax.naming.Name getPathName(javax.naming.Name name)
throws javax.naming.NamingException
name - the name elements leading up to last elementjavax.naming.NamingException - if an error occurs
protected javax.naming.Name getLeafName(javax.naming.Name name)
throws javax.naming.NamingException
name - a value of type 'Name'javax.naming.NamingException - if an error occurs
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||