|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.springframework.mock.jndi.SimpleNamingContext
Simple implementation of a JNDI naming context. Only supports binding plain Objects to String names. Mainly targetted at test environments, but also usable for standalone applications.
This class is not intended for direct usage by applications, although it can be used e.g. to override's JndiTemplate's createInitialContext method in unit tests. Use SimpleNamingContextBuilder to set up a JVM-level JNDI environment.
SimpleNamingContextBuilder,
JndiTemplate.createInitialContext()| Field Summary |
| Fields inherited from interface javax.naming.Context |
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 Summary | |
SimpleNamingContext()
Create a new naming context. |
|
SimpleNamingContext(String root)
Create a new naming context with the given naming root. |
|
SimpleNamingContext(String root,
Hashtable boundObjects,
Hashtable environment)
Create a new naming context with the given naming root, the given name/object map, and the JNDI environment entries. |
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SimpleNamingContext()
public SimpleNamingContext(String root)
public SimpleNamingContext(String root,
Hashtable boundObjects,
Hashtable environment)
| Method Detail |
public NamingEnumeration list(String root)
throws NamingException
list in interface ContextNamingException
public NamingEnumeration listBindings(String root)
throws NamingException
listBindings in interface ContextNamingException
public Object lookup(String pname)
throws NameNotFoundException
lookup in interface ContextNameNotFoundException - if the object could not be found
public Object lookupLink(String name)
throws NameNotFoundException
lookupLink in interface ContextNameNotFoundException
public void bind(String name,
Object obj)
bind in interface ContextSimpleNamingContextBuilder.bind(java.lang.String, java.lang.Object)public void unbind(String name)
unbind in interface Context
public void rebind(String name,
Object obj)
rebind in interface Context
public void rename(String oldName,
String newName)
throws NameNotFoundException
rename in interface ContextNameNotFoundExceptionpublic Context createSubcontext(String name)
createSubcontext in interface Contextpublic void destroySubcontext(String name)
destroySubcontext in interface Contextpublic Hashtable getEnvironment()
getEnvironment in interface Context
public Object addToEnvironment(String propName,
Object propVal)
addToEnvironment in interface Contextpublic Object removeFromEnvironment(String propName)
removeFromEnvironment in interface Contextpublic void close()
close in interface Contextpublic NamingEnumeration list(Name arg0)
list in interface Contextpublic NamingEnumeration listBindings(Name arg0)
listBindings in interface Contextpublic Object lookup(Name arg0)
lookup in interface Contextpublic Object lookupLink(Name arg0)
lookupLink in interface Context
public void bind(Name arg0,
Object arg1)
bind in interface Contextpublic void unbind(Name arg0)
unbind in interface Context
public void rebind(Name arg0,
Object arg1)
rebind in interface Context
public void rename(Name arg0,
Name arg1)
rename in interface Contextpublic Context createSubcontext(Name arg0)
createSubcontext in interface Contextpublic void destroySubcontext(Name arg0)
destroySubcontext in interface Contextpublic String getNameInNamespace()
getNameInNamespace in interface Contextpublic NameParser getNameParser(Name arg0)
getNameParser in interface Contextpublic NameParser getNameParser(String arg0)
getNameParser in interface Context
public Name composeName(Name arg0,
Name arg1)
composeName in interface Context
public String composeName(String arg0,
String arg1)
composeName in interface Context
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||