| Modifier and Type | Field and Description |
|---|---|
private Hashtable |
env |
private Properties |
envAsProperties |
static String |
IGNORE_CLOSE |
private static org.slf4j.Logger |
LOGGER |
private Name |
nameInNamespace |
private boolean |
nameLock |
private NameParser |
nameParser |
private Map<Name,Object> |
namesToObjects |
private Map<Name,Context> |
subContexts |
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| Modifier | Constructor and Description |
|---|---|
protected |
MemoryContext()
IMPROVE Mandatory: Read jndi configuration from system properties otherwise it will not work correctly.
|
|
MemoryContext(Hashtable env) |
protected |
MemoryContext(Hashtable env,
NameParser parser) |
protected |
MemoryContext(NameParser parser) |
public static final String IGNORE_CLOSE
private Properties envAsProperties
private Hashtable env
private NameParser nameParser
private Name nameInNamespace
private boolean nameLock
private static org.slf4j.Logger LOGGER
public MemoryContext(Hashtable env)
env - a Hashtable containing the Context's environment.protected MemoryContext()
protected MemoryContext(NameParser parser)
parser - the NameParser being used by the Context.protected MemoryContext(Hashtable env, NameParser parser)
env - a Hashtable containing the Context's environment.parser - the NameParser being used by the Context.public Object lookup(@NotNull Name name) throws NamingException
lookup in interface ContextOperationNotSupportedException - if name is empty, because "a new instance of this context" (see Context.lookup(Name)) is at this time an unsupported operation.NamingExceptionContext.lookup(javax.naming.Name)@Nullable private Object newInstance() throws OperationNotSupportedException
OperationNotSupportedException.OperationNotSupportedExceptionpublic Object lookup(@NotNull String name) throws NamingException
lookup in interface ContextNamingExceptionContext.lookup(java.lang.String)public void bind(@NotNull
Name name,
@Nullable
Object object)
throws NamingException
bind in interface ContextNamingExceptionContext.bind(javax.naming.Name, java.lang.Object)public void bind(@NotNull
String name,
@Nullable
Object object)
throws NamingException
bind in interface ContextNamingExceptionContext.bind(java.lang.String, java.lang.Object)public void rebind(@NotNull
Name name,
@Nullable
Object object)
throws NamingException
rebind in interface ContextNamingExceptionContext.rebind(javax.naming.Name, java.lang.Object)public void rebind(@NotNull
String name,
@Nullable
Object object)
throws NamingException
rebind in interface ContextNamingExceptionContext.rebind(java.lang.String, java.lang.Object)public void unbind(@NotNull
Name name)
throws NamingException
unbind in interface ContextNamingExceptionContext.unbind(javax.naming.Name)public void unbind(@NotNull
String name)
throws NamingException
unbind in interface ContextNamingExceptionContext.unbind(java.lang.String)public void rename(@NotNull
Name oldName,
@NotNull
Name newName)
throws NamingException
rename in interface ContextNamingExceptionContext.rename(javax.naming.Name, javax.naming.Name)public void rename(@NotNull
String oldName,
@NotNull
String newName)
throws NamingException
rename in interface ContextNamingExceptionContext.rename(java.lang.String, java.lang.String)public NamingEnumeration list(@NotNull Name name) throws NamingException
list in interface ContextNamingExceptionContext.list(javax.naming.Name)public NamingEnumeration list(@NotNull String name) throws NamingException
list in interface ContextNamingExceptionContext.list(java.lang.String)public NamingEnumeration listBindings(@NotNull Name name) throws NamingException
listBindings in interface ContextNamingExceptionContext.listBindings(javax.naming.Name)public NamingEnumeration listBindings(@NotNull String name) throws NamingException
listBindings in interface ContextNamingExceptionContext.listBindings(java.lang.String)public void destroySubcontext(Name name) throws NamingException
destroySubcontext in interface ContextNamingExceptionContext.destroySubcontext(javax.naming.Name)private void destroySubcontexts(Context context) throws NamingException
NamingExceptionpublic void destroySubcontext(String name) throws NamingException
destroySubcontext in interface ContextNamingExceptionContext.destroySubcontext(java.lang.String)public Context createSubcontext(Name name) throws NamingException
createSubcontext in interface ContextNamingExceptionContext.createSubcontext(javax.naming.Name)public Context createSubcontext(String name) throws NamingException
createSubcontext in interface ContextNamingExceptionContext.createSubcontext(java.lang.String)public Object lookupLink(Name name) throws NamingException
lookupLink in interface ContextNamingExceptionContext.lookupLink(javax.naming.Name)public Object lookupLink(String name) throws NamingException
lookupLink in interface ContextNamingExceptionContext.lookupLink(java.lang.String)public NameParser getNameParser(Name name) throws NamingException
getNameParser in interface ContextNamingExceptionContext.getNameParser(javax.naming.Name)public NameParser getNameParser(String name) throws NamingException
getNameParser in interface ContextNamingExceptionContext.getNameParser(java.lang.String)public Name composeName(Name name, Name prefix) throws NamingException
composeName in interface ContextNamingExceptionContext.composeName(javax.naming.Name, javax.naming.Name)public String composeName(String name, String prefix) throws NamingException
composeName in interface ContextNamingExceptionContext.composeName(java.lang.String, java.lang.String)public Object addToEnvironment(String name, Object object)
addToEnvironment in interface ContextContext.addToEnvironment(java.lang.String, java.lang.Object)public Object removeFromEnvironment(String name)
removeFromEnvironment in interface ContextContext.removeFromEnvironment(java.lang.String)public Hashtable getEnvironment()
getEnvironment in interface ContextContext.getEnvironment()public void close()
throws NamingException
close in interface ContextNamingExceptionContext.close()public String getNameInNamespace()
getNameInNamespace in interface ContextContext.getNameInNamespace()public boolean isEmpty()
private void setNameInNamespace(Name name) throws NamingException
name - the Name of the context.NamingException - if the subContext already has a name.public void forceClose()
throws NamingException
NamingExceptionCopyright © 2020. All rights reserved.