Package org.apache.xbean.spring.jndi
Class DefaultContext
java.lang.Object
org.apache.xbean.spring.jndi.DefaultContext
- All Implemented Interfaces:
Serializable
,Context
A simple spring based JNDI context which is mutable
- Version:
- $Revision: 657 $
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map
protected final Hashtable
protected static final NameParser
static final String
protected final Map
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
ConstructorsModifierConstructorDescriptionDefaultContext
(Hashtable env) DefaultContext
(Hashtable environment, Map bindings) DefaultContext
(Hashtable environment, Map bindings, String nameInNamespace) protected
DefaultContext
(DefaultContext clone, Hashtable env) protected
DefaultContext
(DefaultContext clone, Hashtable env, String nameInNamespace) -
Method Summary
Modifier and TypeMethodDescriptionaddToEnvironment
(String propName, Object propVal) void
void
protected void
void
close()
composeName
(String name, String prefix) composeName
(Name name, Name prefix) createSubcontext
(String name) createSubcontext
(Name name) void
destroySubcontext
(String name) void
destroySubcontext
(Name name) getNameParser
(String name) getNameParser
(Name name) protected Map
internalBind
(String name, Object value) internalBind is intended for use only during setup or possibly by suitably synchronized superclasses.protected Map
internalBind
(String name, Object value, boolean allowRebind) boolean
isFreeze()
listBindings
(String name) listBindings
(Name name) lookupLink
(String name) lookupLink
(Name name) protected DefaultContext
void
void
removeFromEnvironment
(String propName) void
void
void
setEntries
(Map entries) void
setFreeze
(boolean freeze) void
void
-
Field Details
-
nameParser
-
environment
-
bindings
-
treeBindings
-
SEPARATOR
- See Also:
-
-
Constructor Details
-
DefaultContext
public DefaultContext() -
DefaultContext
-
DefaultContext
-
DefaultContext
-
DefaultContext
-
DefaultContext
-
-
Method Details
-
addToEnvironment
- Specified by:
addToEnvironment
in interfaceContext
- Throws:
NamingException
-
getEnvironment
- Specified by:
getEnvironment
in interfaceContext
- Throws:
NamingException
-
removeFromEnvironment
- Specified by:
removeFromEnvironment
in interfaceContext
- Throws:
NamingException
-
lookup
- Specified by:
lookup
in interfaceContext
- Throws:
NamingException
-
lookup
- Specified by:
lookup
in interfaceContext
- Throws:
NamingException
-
lookupLink
- Specified by:
lookupLink
in interfaceContext
- Throws:
NamingException
-
composeName
- Specified by:
composeName
in interfaceContext
- Throws:
NamingException
-
composeName
- Specified by:
composeName
in interfaceContext
- Throws:
NamingException
-
list
- Specified by:
list
in interfaceContext
- Throws:
NamingException
-
listBindings
- Specified by:
listBindings
in interfaceContext
- Throws:
NamingException
-
lookupLink
- Specified by:
lookupLink
in interfaceContext
- Throws:
NamingException
-
list
- Specified by:
list
in interfaceContext
- Throws:
NamingException
-
listBindings
- Specified by:
listBindings
in interfaceContext
- Throws:
NamingException
-
bind
- Specified by:
bind
in interfaceContext
- Throws:
NamingException
-
bind
- Specified by:
bind
in interfaceContext
- Throws:
NamingException
-
close
- Specified by:
close
in interfaceContext
- Throws:
NamingException
-
createSubcontext
- Specified by:
createSubcontext
in interfaceContext
- Throws:
NamingException
-
createSubcontext
- Specified by:
createSubcontext
in interfaceContext
- Throws:
NamingException
-
destroySubcontext
- Specified by:
destroySubcontext
in interfaceContext
- Throws:
NamingException
-
destroySubcontext
- Specified by:
destroySubcontext
in interfaceContext
- Throws:
NamingException
-
getNameInNamespace
- Specified by:
getNameInNamespace
in interfaceContext
- Throws:
NamingException
-
getNameParser
- Specified by:
getNameParser
in interfaceContext
- Throws:
NamingException
-
getNameParser
- Specified by:
getNameParser
in interfaceContext
- Throws:
NamingException
-
rebind
- Specified by:
rebind
in interfaceContext
- Throws:
NamingException
-
rebind
- Specified by:
rebind
in interfaceContext
- Throws:
NamingException
-
rename
- Specified by:
rename
in interfaceContext
- Throws:
NamingException
-
rename
- Specified by:
rename
in interfaceContext
- Throws:
NamingException
-
unbind
- Specified by:
unbind
in interfaceContext
- Throws:
NamingException
-
unbind
- Specified by:
unbind
in interfaceContext
- Throws:
NamingException
-
getEntries
-
setEntries
- Throws:
NamingException
-
isFreeze
public boolean isFreeze() -
setFreeze
public void setFreeze(boolean freeze) -
internalBind
internalBind is intended for use only during setup or possibly by suitably synchronized superclasses. It binds every possible lookup into a map in each context. To do this, each context strips off one name segment and if necessary creates a new context for it. Then it asks that context to bind the remaining name. It returns a map containing all the bindings from the next context, plus the context it just created (if it in fact created it). (the names are suitably extended by the segment originally lopped off).- Parameters:
name
-value
-- Returns:
- Throws:
NamingException
-
internalBind
- Throws:
NamingException
-
checkFrozen
- Throws:
OperationNotSupportedException
-
newContext
-