类 SimpleNamingContext
- java.lang.Object
- org.springframework.mock.jndi.SimpleNamingContext
- 所有已实现的接口:
Context
@Deprecated public class SimpleNamingContext extends Object implements Context
已过时。Deprecated as of Spring Framework 5.2 in favor of complete solutions from third parties such as Simple-JNDISimple implementation of a JNDI naming context. Only supports binding plain Objects to String names. Mainly for test environments, but also usable for standalone applications.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.- 作者:
- Rod Johnson, Juergen Hoeller
- 另请参阅:
SimpleNamingContextBuilder
,JndiTemplate.createInitialContext()
构造器概要
构造器 构造器 说明 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.
方法概要
构造器详细资料
SimpleNamingContext
public SimpleNamingContext()
已过时。Create a new naming context.
SimpleNamingContext
public SimpleNamingContext(String root)
已过时。Create a new naming context with the given naming root.
方法详细资料
list
public NamingEnumeration<NameClassPair> list(String root) throws NamingException
已过时。- 指定者:
list
在接口中Context
- 抛出:
NamingException
listBindings
public NamingEnumeration<Binding> listBindings(String root) throws NamingException
已过时。- 指定者:
listBindings
在接口中Context
- 抛出:
NamingException
lookup
public Object lookup(String lookupName) throws NameNotFoundException
已过时。Look up the object with the given name.Note: Not intended for direct use by applications. Will be used by any standard InitialContext JNDI lookups.
- 指定者:
lookup
在接口中Context
- 抛出:
NameNotFoundException
- if the object could not be found
lookupLink
public Object lookupLink(String name) throws NameNotFoundException
已过时。- 指定者:
lookupLink
在接口中Context
- 抛出:
NameNotFoundException
bind
public void bind(String name, Object obj)
已过时。Bind the given object to the given name. Note: Not intended for direct use by applications if setting up a JVM-level JNDI environment. Use SimpleNamingContextBuilder to set up JNDI bindings then.
rename
public void rename(String oldName, String newName) throws NameNotFoundException
已过时。- 指定者:
rename
在接口中Context
- 抛出:
NameNotFoundException
createSubcontext
public Context createSubcontext(String name)
已过时。- 指定者:
createSubcontext
在接口中Context
destroySubcontext
public void destroySubcontext(String name)
已过时。- 指定者:
destroySubcontext
在接口中Context
composeName
public String composeName(String name, String prefix)
已过时。- 指定者:
composeName
在接口中Context
getEnvironment
public Hashtable<String,Object> getEnvironment()
已过时。- 指定者:
getEnvironment
在接口中Context
addToEnvironment
@Nullable public Object addToEnvironment(String propName, Object propVal)
已过时。- 指定者:
addToEnvironment
在接口中Context
removeFromEnvironment
public Object removeFromEnvironment(String propName)
已过时。- 指定者:
removeFromEnvironment
在接口中Context
list
public NamingEnumeration<NameClassPair> list(Name name) throws NamingException
已过时。- 指定者:
list
在接口中Context
- 抛出:
NamingException
listBindings
public NamingEnumeration<Binding> listBindings(Name name) throws NamingException
已过时。- 指定者:
listBindings
在接口中Context
- 抛出:
NamingException
lookup
public Object lookup(Name name) throws NamingException
已过时。- 指定者:
lookup
在接口中Context
- 抛出:
NamingException
lookupLink
public Object lookupLink(Name name) throws NamingException
已过时。- 指定者:
lookupLink
在接口中Context
- 抛出:
NamingException
bind
public void bind(Name name, Object obj) throws NamingException
已过时。- 指定者:
bind
在接口中Context
- 抛出:
NamingException
unbind
public void unbind(Name name) throws NamingException
已过时。- 指定者:
unbind
在接口中Context
- 抛出:
NamingException
rebind
public void rebind(Name name, Object obj) throws NamingException
已过时。- 指定者:
rebind
在接口中Context
- 抛出:
NamingException
rename
public void rename(Name oldName, Name newName) throws NamingException
已过时。- 指定者:
rename
在接口中Context
- 抛出:
NamingException
createSubcontext
public Context createSubcontext(Name name) throws NamingException
已过时。- 指定者:
createSubcontext
在接口中Context
- 抛出:
NamingException
destroySubcontext
public void destroySubcontext(Name name) throws NamingException
已过时。- 指定者:
destroySubcontext
在接口中Context
- 抛出:
NamingException
getNameInNamespace
public String getNameInNamespace() throws NamingException
已过时。- 指定者:
getNameInNamespace
在接口中Context
- 抛出:
NamingException
getNameParser
public NameParser getNameParser(Name name) throws NamingException
已过时。- 指定者:
getNameParser
在接口中Context
- 抛出:
NamingException
getNameParser
public NameParser getNameParser(String name) throws NamingException
已过时。- 指定者:
getNameParser
在接口中Context
- 抛出:
NamingException
composeName
public Name composeName(Name name, Name prefix) throws NamingException
已过时。- 指定者:
composeName
在接口中Context
- 抛出:
NamingException