Class NamingContext
java.lang.Object
org.apache.naming.NamingContext
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final HashMap<String, NamingEntry> Bindings in this Context.Environment.protected final StringName of the associated Catalina Context.protected static final NameParserName parser for this context.protected static final StringManagerThe string manager for this package.Fields inherited from interface javax.naming.ContextAPPLET, 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 SummaryConstructorsConstructorDescriptionNamingContext(Hashtable<String, Object> env, String name) Builds a naming context.NamingContext(Hashtable<String, Object> env, String name, HashMap<String, NamingEntry> bindings) Builds a naming context.
- 
Method SummaryModifier and TypeMethodDescriptionaddToEnvironment(String propName, Object propVal) voidvoidprotected voidBinds a name to an object.protected booleanThrows a naming exception is Context is not writable.voidclose()composeName(String name, String prefix) composeName(Name name, Name prefix) createSubcontext(String name) createSubcontext(Name name) voiddestroySubcontext(String name) voiddestroySubcontext(Name name) Hashtable<?, ?> booleangetNameParser(String name) getNameParser(Name name) protected booleanlistBindings(String name) listBindings(Name name) protected ObjectRetrieves the named object.lookupLink(String name) lookupLink(Name name) voidvoidremoveFromEnvironment(String propName) voidvoidvoidsetExceptionOnFailedWrite(boolean exceptionOnFailedWrite) voidvoid
- 
Field Details- 
nameParserName parser for this context.
- 
env
- 
smThe string manager for this package.
- 
bindingsBindings in this Context.
- 
nameName of the associated Catalina Context.
 
- 
- 
Constructor Details- 
NamingContext
- 
NamingContextpublic NamingContext(Hashtable<String, Object> env, String name, HashMap<String, NamingEntry> bindings) Builds a naming context.- Parameters:
- env- The environment to use to construct the naming context
- name- The name of the associated Catalina Context
- bindings- The initial bindings for the naming context
 
 
- 
- 
Method Details- 
getExceptionOnFailedWritepublic boolean getExceptionOnFailedWrite()
- 
setExceptionOnFailedWritepublic void setExceptionOnFailedWrite(boolean exceptionOnFailedWrite) 
- 
lookup- Specified by:
- lookupin interface- Context
- Throws:
- NamingException
 
- 
lookup- Specified by:
- lookupin interface- Context
- Throws:
- NamingException
 
- 
bind- Specified by:
- bindin interface- Context
- Throws:
- NamingException
 
- 
bind- Specified by:
- bindin interface- Context
- Throws:
- NamingException
 
- 
rebind- Specified by:
- rebindin interface- Context
- Throws:
- NamingException
 
- 
rebind- Specified by:
- rebindin interface- Context
- Throws:
- NamingException
 
- 
unbind- Specified by:
- unbindin interface- Context
- Throws:
- NamingException
 
- 
unbind- Specified by:
- unbindin interface- Context
- Throws:
- NamingException
 
- 
rename- Specified by:
- renamein interface- Context
- Throws:
- NamingException
 
- 
rename- Specified by:
- renamein interface- Context
- Throws:
- NamingException
 
- 
list- Specified by:
- listin interface- Context
- Throws:
- NamingException
 
- 
list- Specified by:
- listin interface- Context
- Throws:
- NamingException
 
- 
listBindings- Specified by:
- listBindingsin interface- Context
- Throws:
- NamingException
 
- 
listBindings- Specified by:
- listBindingsin interface- Context
- Throws:
- NamingException
 
- 
destroySubcontext- Specified by:
- destroySubcontextin interface- Context
- Throws:
- NamingException
 
- 
destroySubcontext- Specified by:
- destroySubcontextin interface- Context
- Throws:
- NamingException
 
- 
createSubcontext- Specified by:
- createSubcontextin interface- Context
- Throws:
- NamingException
 
- 
createSubcontext- Specified by:
- createSubcontextin interface- Context
- Throws:
- NamingException
 
- 
lookupLink- Specified by:
- lookupLinkin interface- Context
- Throws:
- NamingException
 
- 
lookupLink- Specified by:
- lookupLinkin interface- Context
- Throws:
- NamingException
 
- 
getNameParser- Specified by:
- getNameParserin interface- Context
- Throws:
- NamingException
 
- 
getNameParser- Specified by:
- getNameParserin interface- Context
- Throws:
- NamingException
 
- 
composeName- Specified by:
- composeNamein interface- Context
- Throws:
- NamingException
 
- 
composeName- Specified by:
- composeNamein interface- Context
 
- 
addToEnvironment- Specified by:
- addToEnvironmentin interface- Context
 
- 
removeFromEnvironment- Specified by:
- removeFromEnvironmentin interface- Context
 
- 
getEnvironment- Specified by:
- getEnvironmentin interface- Context
 
- 
close- Specified by:
- closein interface- Context
- Throws:
- NamingException
 
- 
getNameInNamespace- Specified by:
- getNameInNamespacein interface- Context
- Throws:
- NamingException
 
- 
lookupRetrieves the named object.- Parameters:
- name- the name of the object to look up
- resolveLinks- If true, the links will be resolved
- Returns:
- the object bound to name
- Throws:
- NamingException- if a naming exception is encountered
 
- 
bindBinds a name to an object. All intermediate contexts and the target context (that named by all but terminal atomic component of the name) must already exist.- Parameters:
- name- the name to bind; may not be empty
- obj- the object to bind; possibly null
- rebind- if true, then perform a rebind (ie, overwrite)
- Throws:
- NameAlreadyBoundException- if name is already bound
- InvalidAttributesException- if object did not supply all mandatory attributes
- NamingException- if a naming exception is encountered
 
- 
isWritableprotected boolean isWritable()- Returns:
- trueif writing is allowed on this context.
 
- 
checkWritableThrows a naming exception is Context is not writable.- Returns:
- trueif the Context is writable
- Throws:
- NamingException- if the Context is not writable and- exceptionOnFailedWriteis- true
 
 
-