public final class ImmutableContext.NestedImmutableContext extends AbstractContext
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 |
---|
NestedImmutableContext(String path,
Map<String,Object> bindings) |
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<String,Object> 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.
|
protected ImmutableContext |
getImmutableContext() |
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
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<String,Object> bindings)
NestedContextFactory
path
- the path to the new nested contextbindings
- the initial bindings for the contextprotected ImmutableContext getImmutableContext()
Copyright © 2005–2022. All rights reserved.