public class InMemoryNamingStore extends Object implements WritableNamingStore
| Constructor and Description |
|---|
InMemoryNamingStore()
Construct instance with no event support.
|
InMemoryNamingStore(NamingEventCoordinator eventCoordinator)
Construct instance with an event coordinator.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNamingListener(Name target,
int scope,
NamingListener listener)
Add a
NamingListener to the naming event coordinator. |
void |
bind(Name name,
Object object)
Bind and object into the naming store, creating parent contexts if needed.
|
void |
bind(Name name,
Object object,
Class<?> bindType)
Bind and object into the naming store, creating parent contexts if needed.
|
void |
close()
Close the store.
|
Context |
createSubcontext(Name name)
Create a sub-context for the provided name.
|
List<NameClassPair> |
list(Name name)
List all NameClassPair instances at a given location in the tree.
|
List<Binding> |
listBindings(Name name)
List all the Binding instances at a given location in the tree.
|
Object |
lookup(Name name)
Lookup the object value of a binding node in the tree.
|
void |
rebind(Name name,
Object object)
Re-bind and object into the naming store.
|
void |
rebind(Name name,
Object object,
Class<?> bindType)
Re-bind and object into the naming store.
|
void |
removeNamingListener(NamingListener listener)
Remove a
NamingListener from the naming event coordinator. |
void |
unbind(Name name)
Unbind the entry in the provided location.
|
public InMemoryNamingStore()
public InMemoryNamingStore(NamingEventCoordinator eventCoordinator)
eventCoordinator - The event coordinatorpublic void bind(Name name, Object object) throws NamingException
bind in interface WritableNamingStorename - The entry nameobject - The entry objectNamingException - If any problems occurpublic void bind(Name name, Object object, Class<?> bindType) throws NamingException
bind in interface WritableNamingStorename - The entry nameobject - The entry objectbindType - The entry classNamingException - If any problems occurpublic void rebind(Name name, Object object) throws NamingException
rebind in interface WritableNamingStorename - The entry nameobject - The entry objectNamingException - If any problems occurpublic void rebind(Name name, Object object, Class<?> bindType) throws NamingException
rebind in interface WritableNamingStorename - The entry nameobject - The entry objectbindType - The entry classNamingException - If any problems occurpublic void unbind(Name name) throws NamingException
unbind in interface WritableNamingStorename - The entry nameNamingExceptionpublic Object lookup(Name name) throws NamingException
lookup in interface NamingStorename - The entry nameNamingExceptionpublic List<NameClassPair> list(Name name) throws NamingException
list in interface NamingStorename - The entry nameNamingExceptionpublic List<Binding> listBindings(Name name) throws NamingException
listBindings in interface NamingStorename - The entry nameNamingExceptionpublic Context createSubcontext(Name name) throws NamingException
WritableNamingStorecreateSubcontext in interface WritableNamingStorename - The entry nameNamingException - If any errors occurpublic void close()
throws NamingException
close in interface NamingStoreNamingExceptionpublic void addNamingListener(Name target, int scope, NamingListener listener)
NamingListener to the naming event coordinator.addNamingListener in interface NamingStoretarget - The target name to add the listener toscope - The listener scopelistener - The listenerpublic void removeNamingListener(NamingListener listener)
NamingListener from the naming event coordinator.removeNamingListener in interface NamingStorelistener - The listenerCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.