| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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.
| 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. | |
| Method Summary | |
Object | addToEnvironment(String propName, Object propVal) |
void | bind(String name, Object obj)Bind the given object to the given name. |
void | bind(Name arg0, Object arg1) |
void | close() |
Name | composeName(Name arg0, Name arg1) |
String | composeName(String arg0, String arg1) |
Context | createSubcontext(String name) |
Context | createSubcontext(Name arg0) |
void | destroySubcontext(String name) |
void | destroySubcontext(Name arg0) |
Hashtable | getEnvironment() |
String | getNameInNamespace() |
NameParser | getNameParser(Name arg0) |
NameParser | getNameParser(String arg0) |
NamingEnumeration | list(String root) |
NamingEnumeration | list(Name arg0) |
NamingEnumeration | listBindings(String root) |
NamingEnumeration | listBindings(Name arg0) |
Object | lookup(String pname)Look up the object with the given name. |
Object | lookup(Name arg0) |
Object | lookupLink(String name) |
Object | lookupLink(Name arg0) |
void | rebind(String name, Object obj) |
void | rebind(Name arg0, Object arg1) |
Object | removeFromEnvironment(String propName) |
void | rename(String oldName, String newName) |
void | rename(Name arg0, Name arg1) |
void | unbind(String name) |
void | unbind(Name arg0) |
| Constructor Detail |
public SimpleNamingContext()
public SimpleNamingContext(String root)
public SimpleNamingContext(String root, Hashtable boundObjects, Hashtable environment)
| Method Detail |
public Object addToEnvironment(String propName, Object propVal)
public void bind(String name, Object obj)
public void bind(Name arg0, Object arg1)
public void close()
public Name composeName(Name arg0, Name arg1)
public String composeName(String arg0, String arg1)
public Context createSubcontext(String name)
public Context createSubcontext(Name arg0)
public void destroySubcontext(String name)
public void destroySubcontext(Name arg0)
public Hashtable getEnvironment()
public String getNameInNamespace()
public NameParser getNameParser(Name arg0)
public NameParser getNameParser(String arg0)
public NamingEnumeration list(String root)
throws javax.naming.NamingException
public NamingEnumeration list(Name arg0)
public NamingEnumeration listBindings(String root)
throws javax.naming.NamingException
public NamingEnumeration listBindings(Name arg0)
public Object lookup(String pname)
throws javax.naming.NameNotFoundException
public Object lookup(Name arg0)
public Object lookupLink(String name)
throws javax.naming.NameNotFoundException
public Object lookupLink(Name arg0)
public void rebind(String name, Object obj)
public void rebind(Name arg0, Object arg1)
public Object removeFromEnvironment(String propName)
public void rename(String oldName, String newName)
throws javax.naming.NameNotFoundException
public void rename(Name arg0, Name arg1)
public void unbind(String name)
public void unbind(Name arg0)
| Association Links |
to Class java.util.Hashtable
to Class java.util.Hashtable
| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||