public class SimpleNamingContext extends Object implements Context
This class is not intended for direct usage by applications, although it can
be used for example to override JndiTemplate's
createInitialContext method in unit tests. Typically,
SimpleNamingContextBuilder will be used to set up a JVM-level JNDI
environment.
org.springframework.mock.jndi.SimpleNamingContextBuilder,
org.springframework.jndi.JndiTemplate#createInitialContextAPPLET, 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 |
|---|
SimpleNamingContext()
Create a new naming context.
|
SimpleNamingContext(String root)
Create a new naming context with the given naming root.
|
SimpleNamingContext(String root,
Hashtable<String,Object> boundObjects,
Hashtable<String,Object> env)
Create a new naming context with the given naming root, the given
name/object map, and the JNDI environment entries.
|
public SimpleNamingContext()
public SimpleNamingContext(String root)
public Object addToEnvironment(String propName, Object propVal)
addToEnvironment in interface Contextpublic void bind(Name name, Object obj) throws NamingException
bind in interface ContextNamingExceptionpublic void bind(String name, Object obj)
public Name composeName(Name name, Name prefix) throws NamingException
composeName in interface ContextNamingExceptionpublic String composeName(String name, String prefix)
composeName in interface Contextpublic Context createSubcontext(Name name) throws NamingException
createSubcontext in interface ContextNamingExceptionpublic Context createSubcontext(String name)
createSubcontext in interface Contextpublic void destroySubcontext(Name name) throws NamingException
destroySubcontext in interface ContextNamingExceptionpublic void destroySubcontext(String name)
destroySubcontext in interface Contextpublic Hashtable<String,Object> getEnvironment()
getEnvironment in interface Contextpublic String getNameInNamespace() throws NamingException
getNameInNamespace in interface ContextNamingExceptionpublic NameParser getNameParser(Name name) throws NamingException
getNameParser in interface ContextNamingExceptionpublic NameParser getNameParser(String name) throws NamingException
getNameParser in interface ContextNamingExceptionpublic NamingEnumeration<NameClassPair> list(Name name) throws NamingException
list in interface ContextNamingExceptionpublic NamingEnumeration<NameClassPair> list(String root) throws NamingException
list in interface ContextNamingExceptionpublic NamingEnumeration<Binding> listBindings(Name name) throws NamingException
listBindings in interface ContextNamingExceptionpublic NamingEnumeration<Binding> listBindings(String root) throws NamingException
listBindings in interface ContextNamingExceptionpublic Object lookup(Name name) throws NamingException
lookup in interface ContextNamingExceptionpublic Object lookup(String lookupName) throws NameNotFoundException
Note: Not intended for direct use by applications. Will be used by any standard InitialContext JNDI lookups.
lookup in interface ContextNameNotFoundException - if the object could not be foundpublic Object lookupLink(Name name) throws NamingException
lookupLink in interface ContextNamingExceptionpublic Object lookupLink(String name) throws NameNotFoundException
lookupLink in interface ContextNameNotFoundExceptionpublic void rebind(Name name, Object obj) throws NamingException
rebind in interface ContextNamingExceptionpublic Object removeFromEnvironment(String propName)
removeFromEnvironment in interface Contextpublic void rename(Name oldName, Name newName) throws NamingException
rename in interface ContextNamingExceptionpublic void rename(String oldName, String newName) throws NameNotFoundException
rename in interface ContextNameNotFoundExceptionpublic void unbind(Name name) throws NamingException
unbind in interface ContextNamingExceptionCopyright © 2015 Revolution Systems Inc.. All rights reserved.