open class SimpleNamingContext : Context
Simple 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.
Author
Rod Johnson
Author
Juergen Hoeller
See Also
SimpleNamingContextBuilderorg.springframework.jndi.JndiTemplate#createInitialContext
SimpleNamingContext()
Create a new naming context. SimpleNamingContext(root: String)
Create a new naming context with the given naming root. SimpleNamingContext(root: String, boundObjects: Hashtable<String, Any>, env: Hashtable<String, Any>)
Create a new naming context with the given naming root, the given name/object map, and the JNDI environment entries. |
open fun addToEnvironment(propName: String, propVal: Any): Any |
|
open fun bind(name: String, obj: Any): Unit
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. open fun bind(name: Name, obj: Any): Unit |
|
open fun close(): Unit |
|
open fun composeName(name: String, prefix: String): Stringopen fun composeName(name: Name, prefix: Name): Name |
|
open fun createSubcontext(name: String): Contextopen fun createSubcontext(name: Name): Context |
|
open fun destroySubcontext(name: String): Unitopen fun destroySubcontext(name: Name): Unit |
|
open fun getEnvironment(): Hashtable<String, Any> |
|
open fun getNameInNamespace(): String |
|
open fun getNameParser(name: Name): NameParseropen fun getNameParser(name: String): NameParser |
|
open fun list(root: String): NamingEnumeration<NameClassPair>open fun list(name: Name): NamingEnumeration<NameClassPair> |
|
open fun listBindings(root: String): NamingEnumeration<Binding>open fun listBindings(name: Name): NamingEnumeration<Binding> |
|
open fun lookup(lookupName: String): Any
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. open fun lookup(name: Name): Any |
|
open fun lookupLink(name: String): Anyopen fun lookupLink(name: Name): Any |
|
open fun rebind(name: String, obj: Any): Unitopen fun rebind(name: Name, obj: Any): Unit |
|
open fun removeFromEnvironment(propName: String): Any |
|
open fun rename(oldName: String, newName: String): Unitopen fun rename(oldName: Name, newName: Name): Unit |
|
open fun unbind(name: String): Unitopen fun unbind(name: Name): Unit |