|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.mortbay.jndi.NamingContext
NamingContext
Implementation of Context interface.
All Names are expected to be Compound, not Composite.
Nested Class Summary | |
class |
NamingContext.BindingEnumeration
BindingEnumeration |
class |
NamingContext.NameEnumeration
NameEnumeration |
Field Summary | |
static java.util.Enumeration |
EMPTY_ENUM
|
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 | |
NamingContext()
Constructor |
|
NamingContext(java.util.Hashtable env)
Creates a new NamingContext instance. |
|
NamingContext(java.util.Hashtable env,
java.lang.String name,
javax.naming.Context parent,
javax.naming.NameParser parser)
Constructor |
Method Summary | |
java.lang.Object |
addToEnvironment(java.lang.String propName,
java.lang.Object propVal)
Add an environment setting to this Context |
void |
bind(javax.naming.Name name,
java.lang.Object obj)
Bind a name to an object |
void |
bind(java.lang.String name,
java.lang.Object obj)
Bind a name (as a String) to an object |
java.lang.Object |
clone()
Clone this NamingContext |
void |
close()
Not supported. |
javax.naming.Name |
composeName(javax.naming.Name name,
javax.naming.Name prefix)
Join two names together. |
java.lang.String |
composeName(java.lang.String name,
java.lang.String prefix)
Join two names together. |
javax.naming.Context |
createSubcontext(javax.naming.Name name)
Create a context as a child of this one |
javax.naming.Context |
createSubcontext(java.lang.String name)
Create a Context as a child of this one |
void |
destroySubcontext(javax.naming.Name name)
Not supported |
void |
destroySubcontext(java.lang.String name)
Not supported |
java.util.Hashtable |
getEnvironment()
Get the environment of this Context. |
java.lang.String |
getName()
Getter for _name |
java.lang.String |
getNameInNamespace()
Get the full name of this Context node by visiting it's ancestors back to root. |
javax.naming.NameParser |
getNameParser(javax.naming.Name name)
Return a NameParser for this Context. |
javax.naming.NameParser |
getNameParser(java.lang.String name)
Return a NameParser for this Context. |
javax.naming.Context |
getParent()
Getter for _parent |
javax.naming.NamingEnumeration |
list(javax.naming.Name name)
List all names bound at Context named by Name |
javax.naming.NamingEnumeration |
list(java.lang.String name)
List all names bound at Context named by Name |
javax.naming.NamingEnumeration |
listBindings(javax.naming.Name name)
List all Bindings present at Context named by Name |
javax.naming.NamingEnumeration |
listBindings(java.lang.String name)
List all Bindings at Name |
java.lang.Object |
lookup(javax.naming.Name name)
Lookup a binding by name |
java.lang.Object |
lookup(java.lang.String name)
Lookup binding of an object by name |
java.lang.Object |
lookupLink(javax.naming.Name name)
Lookup link bound to name |
java.lang.Object |
lookupLink(java.lang.String name)
Lookup link bound to name |
void |
rebind(javax.naming.Name name,
java.lang.Object obj)
Overwrite or create a binding |
void |
rebind(java.lang.String name,
java.lang.Object obj)
Overwrite or create a binding from Name to Object |
java.lang.Object |
removeFromEnvironment(java.lang.String propName)
Remove a property from this Context's environment. |
void |
rename(javax.naming.Name oldName,
javax.naming.Name newName)
Not supported |
void |
rename(java.lang.String oldName,
java.lang.String newName)
Not supported |
void |
setNameParser(javax.naming.NameParser parser)
Setter for _parser |
javax.naming.Name |
toCanonicalName(javax.naming.Name name)
Remove leading or trailing empty components from name. |
void |
unbind(javax.naming.Name name)
Not supported. |
void |
unbind(java.lang.String name)
Not supported. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.util.Enumeration EMPTY_ENUM
Constructor Detail |
public NamingContext(java.util.Hashtable env, java.lang.String name, javax.naming.Context parent, javax.naming.NameParser parser)
env
- environment propertiesname
- relative name of this contextparent
- immediate ancestor Context (can be null)parser
- NameParser for this Contextpublic NamingContext(java.util.Hashtable env)
NamingContext
instance.
env
- a Hashtable
valuepublic NamingContext()
Method Detail |
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if an error occurspublic java.lang.String getName()
public javax.naming.Context getParent()
public void setNameParser(javax.naming.NameParser parser)
public void bind(javax.naming.Name name, java.lang.Object obj) throws javax.naming.NamingException
bind
in interface javax.naming.Context
name
- Name of the objectobj
- object to bind
javax.naming.NamingException
- if an error occurspublic void bind(java.lang.String name, java.lang.Object obj) throws javax.naming.NamingException
bind
in interface javax.naming.Context
name
- a String
valueobj
- an Object
value
javax.naming.NamingException
- if an error occurspublic javax.naming.Context createSubcontext(javax.naming.Name name) throws javax.naming.NamingException
createSubcontext
in interface javax.naming.Context
name
- a Name
value
Context
value
javax.naming.NamingException
- if an error occurspublic javax.naming.Context createSubcontext(java.lang.String name) throws javax.naming.NamingException
createSubcontext
in interface javax.naming.Context
name
- a String
value
Context
value
javax.naming.NamingException
- if an error occurspublic void destroySubcontext(java.lang.String name) throws javax.naming.NamingException
destroySubcontext
in interface javax.naming.Context
name
- name of subcontext to remove
javax.naming.NamingException
- if an error occurspublic void destroySubcontext(javax.naming.Name name) throws javax.naming.NamingException
destroySubcontext
in interface javax.naming.Context
name
- name of subcontext to remove
javax.naming.NamingException
- if an error occurspublic java.lang.Object lookup(javax.naming.Name name) throws javax.naming.NamingException
lookup
in interface javax.naming.Context
name
- name of bound object
javax.naming.NamingException
- if an error occurspublic java.lang.Object lookup(java.lang.String name) throws javax.naming.NamingException
lookup
in interface javax.naming.Context
name
- name of bound object
javax.naming.NamingException
- if an error occurspublic java.lang.Object lookupLink(javax.naming.Name name) throws javax.naming.NamingException
lookupLink
in interface javax.naming.Context
name
- name of link binding
javax.naming.NamingException
- if an error occurspublic java.lang.Object lookupLink(java.lang.String name) throws javax.naming.NamingException
lookupLink
in interface javax.naming.Context
name
- name of link binding
javax.naming.NamingException
- if an error occurspublic javax.naming.NamingEnumeration list(javax.naming.Name name) throws javax.naming.NamingException
list
in interface javax.naming.Context
name
- a Name
value
NamingEnumeration
value
javax.naming.NamingException
- if an error occurspublic javax.naming.NamingEnumeration list(java.lang.String name) throws javax.naming.NamingException
list
in interface javax.naming.Context
name
- a Name
value
NamingEnumeration
value
javax.naming.NamingException
- if an error occurspublic javax.naming.NamingEnumeration listBindings(javax.naming.Name name) throws javax.naming.NamingException
listBindings
in interface javax.naming.Context
name
- a Name
value
NamingEnumeration
value
javax.naming.NamingException
- if an error occurspublic javax.naming.NamingEnumeration listBindings(java.lang.String name) throws javax.naming.NamingException
listBindings
in interface javax.naming.Context
name
- a String
value
NamingEnumeration
value
javax.naming.NamingException
- if an error occurspublic void rebind(javax.naming.Name name, java.lang.Object obj) throws javax.naming.NamingException
rebind
in interface javax.naming.Context
name
- a Name
valueobj
- an Object
value
javax.naming.NamingException
- if an error occurspublic void rebind(java.lang.String name, java.lang.Object obj) throws javax.naming.NamingException
rebind
in interface javax.naming.Context
name
- a String
valueobj
- an Object
value
javax.naming.NamingException
- if an error occurspublic void unbind(java.lang.String name) throws javax.naming.NamingException
unbind
in interface javax.naming.Context
name
- a String
value
javax.naming.NamingException
- if an error occurspublic void unbind(javax.naming.Name name) throws javax.naming.NamingException
unbind
in interface javax.naming.Context
name
- a String
value
javax.naming.NamingException
- if an error occurspublic void rename(javax.naming.Name oldName, javax.naming.Name newName) throws javax.naming.NamingException
rename
in interface javax.naming.Context
oldName
- a Name
valuenewName
- a Name
value
javax.naming.NamingException
- if an error occurspublic void rename(java.lang.String oldName, java.lang.String newName) throws javax.naming.NamingException
rename
in interface javax.naming.Context
oldName
- a Name
valuenewName
- a Name
value
javax.naming.NamingException
- if an error occurspublic javax.naming.Name composeName(javax.naming.Name name, javax.naming.Name prefix) throws javax.naming.NamingException
composeName
in interface javax.naming.Context
name
- a Name
valueprefix
- a Name
value
Name
value
javax.naming.NamingException
- if an error occurspublic java.lang.String composeName(java.lang.String name, java.lang.String prefix) throws javax.naming.NamingException
composeName
in interface javax.naming.Context
name
- a Name
valueprefix
- a Name
value
Name
value
javax.naming.NamingException
- if an error occurspublic void close() throws javax.naming.NamingException
close
in interface javax.naming.Context
javax.naming.NamingException
- if an error occurspublic javax.naming.NameParser getNameParser(javax.naming.Name name)
getNameParser
in interface javax.naming.Context
name
- a Name
value
NameParser
valuepublic javax.naming.NameParser getNameParser(java.lang.String name)
getNameParser
in interface javax.naming.Context
name
- a Name
value
NameParser
valuepublic java.lang.String getNameInNamespace() throws javax.naming.NamingException
getNameInNamespace
in interface javax.naming.Context
javax.naming.NamingException
- if an error occurspublic java.lang.Object addToEnvironment(java.lang.String propName, java.lang.Object propVal) throws javax.naming.NamingException
addToEnvironment
in interface javax.naming.Context
propName
- name of the property to addpropVal
- value of the property to add
javax.naming.NamingException
- if an error occurspublic java.lang.Object removeFromEnvironment(java.lang.String propName) throws javax.naming.NamingException
removeFromEnvironment
in interface javax.naming.Context
propName
- name of property to remove
javax.naming.NamingException
- if an error occurspublic java.util.Hashtable getEnvironment()
getEnvironment
in interface javax.naming.Context
public javax.naming.Name toCanonicalName(javax.naming.Name name)
name
- the name to normalize
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |