public class ImmutableContext extends AbstractContext
Modifier and Type | Class and Description |
---|---|
class |
ImmutableContext.NestedImmutableContext
Nested context which shares the absolute index map in MapContext.
|
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 and Description |
---|
ImmutableContext(Map<String,Object> bindings) |
ImmutableContext(Map<String,Object> bindings,
boolean cacheReferences) |
ImmutableContext(String nameInNamespace,
Map<String,Object> bindings,
boolean cacheReferences) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
addBinding(String name,
Object value,
boolean rebind) |
protected void |
addDeepBinding(String name,
Object value,
boolean createIntermediateContexts) |
Context |
createNestedSubcontext(String path,
Map bindings)
Creates a nested subcontext instance.
|
protected Map<String,Object> |
getBindings()
Gets a map of the bindings for the current node (i.e., no names with slashes).
|
protected Object |
getDeepBinding(String name)
Gets the object bound to the name.
|
boolean |
isNestedSubcontext(Object value)
Is the specified value an instance of a nested context
|
protected boolean |
removeBinding(String name,
boolean removeNotEmptyContext)
Removes the binding from the context.
|
protected void |
removeDeepBinding(Name name,
boolean pruneEmptyContexts) |
addBinding, addDeepBinding, addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, createSubcontextTree, destroySubcontext, destroySubcontext, faultLookup, getBinding, getContextAccess, getEnvironment, getNameInNamespace, getNameInNamespace, getNameInNamespace, getNameParser, getNameParser, getNameParser, getParsedNameInNamespace, getSize, isEmpty, list, list, list, listBindings, listBindings, listBindings, lookup, lookup, lookup, lookupFinalContext, lookupLink, lookupLink, rebind, rebind, removeDeepBinding, removeFromEnvironment, rename, rename, unbind, unbind
public ImmutableContext(Map<String,Object> bindings) throws NamingException
NamingException
public ImmutableContext(Map<String,Object> bindings, boolean cacheReferences) throws NamingException
NamingException
public ImmutableContext(String nameInNamespace, Map<String,Object> bindings, boolean cacheReferences) throws NamingException
NamingException
protected Object getDeepBinding(String name)
AbstractContext
getDeepBinding
in class AbstractContext
name
- the nameprotected Map<String,Object> getBindings()
AbstractContext
getBindings
in class AbstractContext
protected final void addDeepBinding(String name, Object value, boolean createIntermediateContexts) throws NamingException
NamingException
protected final boolean addBinding(String name, Object value, boolean rebind) throws NamingException
addBinding
in class AbstractContext
NamingException
protected final void removeDeepBinding(Name name, boolean pruneEmptyContexts) throws NamingException
removeDeepBinding
in class AbstractContext
NamingException
protected final boolean removeBinding(String name, boolean removeNotEmptyContext) throws NamingException
AbstractContext
removeBinding
in class AbstractContext
name
- name under which the value should be boundremoveNotEmptyContext
- ??? TODO figure this outNamingException
- if a problem occurs during the bind such as a value already being boundpublic boolean isNestedSubcontext(Object value)
NestedContextFactory
value
- the value to inspectpublic Context createNestedSubcontext(String path, Map bindings)
NestedContextFactory
path
- the path to the new nested contextbindings
- the initial bindings for the contextCopyright © 2005–2018. All rights reserved.