tyrex.naming
public class MemoryContext extends Object implements Context
An instance of MemoryContext constructed with no environment attribute will use it's namespace and serve as the root of that namespace. Such a namespace is no accessible except through the creating context, and is garbage collected when all such contexts are no longer referenced. If necessary the root context can be duplicated using lookup( "" ).
If the environment attribute Context.PROVIDER_URL is set, the context will reference a node in a namespace shared by all such contexts. That tree is statically held in memory for the life time of the virtual machine.
Version: $Revision: 1.10 $ $Date: 2001/03/19 17:39:00 $
See Also: MemoryContextFactory
Field Summary | |
---|---|
static NameParser | DefaultNameParser
The default name parser for this context. |
static String | NameSeparator
The default name separator for this context is '/'. |
static String | ReadOnly
Environment attribute to set a context read-only. |
Constructor Summary | |
---|---|
MemoryContext(Hashtable env)
Construct a new context with the specified environment
attributes. | |
MemoryContext(MemoryBinding bindings, Hashtable env)
Construct a new context with the specified bindings and
environment attributes. |
Method Summary | |
---|---|
Object | addToEnvironment(String name, Object value) |
void | bind(String name, Object value) |
void | bind(Name name, Object value) |
void | close() |
Name | composeName(Name name, Name prefix) |
String | composeName(String name, String prefix) |
Context | createSubcontext(String name) |
Context | createSubcontext(Name name) |
void | debug(PrintWriter writer) |
void | destroySubcontext(String name) |
void | destroySubcontext(Name name) |
MemoryBinding | getBindings()
Returns the bindings represented by this context.
|
Hashtable | getEnvironment() |
String | getNameInNamespace() |
NameParser | getNameParser(String name) |
NameParser | getNameParser(Name name) |
NamingEnumeration | list(String name) |
NamingEnumeration | list(Name name) |
NamingEnumeration | listBindings(String name) |
NamingEnumeration | listBindings(Name name) |
Object | lookup(String name) |
Object | lookup(Name name) |
Object | lookupLink(String name) |
Object | lookupLink(Name name) |
void | rebind(String name, Object value) |
void | rebind(Name name, Object value) |
Object | removeFromEnvironment(String name) |
void | rename(String oldName, String newName) |
void | rename(Name oldName, Name newName) |
String | toString() |
void | unbind(String name) |
void | unbind(Name name) |
Parameters: env The environment attributes
Throws: NotContextException The attribute Context.PROVIDER_URL does not specify a context InvalidNameException The attribute Context.PROVIDER_URL is an invalid name