public class InMemoryNamingStore extends Object implements WritableNamingStore
| Constructor and Description |
|---|
InMemoryNamingStore()
Construct instance with no event support, and an empty base name.
|
InMemoryNamingStore(Name baseName)
Construct instance with no event support, and the specified base name.
|
InMemoryNamingStore(NamingEventCoordinator eventCoordinator)
Construct instance with an event coordinator, and an empty base name.
|
InMemoryNamingStore(NamingEventCoordinator eventCoordinator,
Name baseName)
Construct instance with an event coordinator, and the specified base name.
|
| 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.
|
Name |
getBaseName()
Retrieves the store's base name, which is the prefix for the absolute name of each entry in the store.
|
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.
|
Object |
lookup(Name name,
boolean dereference)
Look up an object from the naming store.
|
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 InMemoryNamingStore(Name baseName)
baseName - public InMemoryNamingStore(NamingEventCoordinator eventCoordinator, Name baseName)
eventCoordinator - baseName - public Name getBaseName() throws NamingException
getBaseName in interface NamingStoreNamingExceptionpublic 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 Object lookup(Name name, boolean dereference) throws NamingException
NamingStorelookup in interface NamingStorename - The entry namedereference - if true indicates that managed references should retrieve the instance.NamingException - If any errors occur.public 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 © 2019 JBoss by Red Hat. All rights reserved.