Package org.jboss.as.naming
Class ServiceBasedNamingStore
- java.lang.Object
-
- org.jboss.as.naming.ServiceBasedNamingStore
-
- All Implemented Interfaces:
NamingStore
- Direct Known Subclasses:
WritableServiceBasedNamingStore
public class ServiceBasedNamingStore extends Object implements NamingStore
- Author:
- John Bailey, Jason T. Greene, Eduardo Martins
-
-
Constructor Summary
Constructors Constructor Description ServiceBasedNamingStore(org.jboss.msc.service.ServiceRegistry serviceRegistry, org.jboss.msc.service.ServiceName serviceNameBase)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(org.jboss.msc.service.ServiceName serviceName)voidaddNamingListener(Name target, int scope, NamingListener listener)Add aNamingListenerfor a specific target and scope.protected org.jboss.msc.service.ServiceNamebuildServiceName(Name name)voidclose()Close the naming store and cleanup any resource used by the store.NamegetBaseName()Retrieves the store's base name, which is the prefix for the absolute name of each entry in the store.protected org.jboss.msc.service.ServiceNamegetServiceNameBase()protected org.jboss.msc.service.ServiceRegistrygetServiceRegistry()List<NameClassPair>list(Name name)List the NameClassPair instances for the provided name.List<Binding>listBindings(Name name)List the binding objects for a specified name.Objectlookup(Name name)Look up an object from the naming store.Objectlookup(Name name, boolean dereference)Look up an object from the naming store.voidremove(org.jboss.msc.service.ServiceName serviceName)voidremoveNamingListener(NamingListener listener)Remove aNamingListenerfrom all targets and scopes
-
-
-
Method Detail
-
lookup
public Object lookup(Name name) throws NamingException
Description copied from interface:NamingStoreLook up an object from the naming store. An entry for this name must already exist.- Specified by:
lookupin interfaceNamingStore- Parameters:
name- The entry name- Returns:
- The object from the store.
- Throws:
NamingException- If any errors occur.
-
lookup
public Object lookup(Name name, boolean dereference) throws NamingException
Description copied from interface:NamingStoreLook up an object from the naming store. An entry for this name must already exist.- Specified by:
lookupin interfaceNamingStore- Parameters:
name- The entry namedereference- if true indicates that managed references should retrieve the instance.- Returns:
- The object from the store.
- Throws:
NamingException- If any errors occur.
-
list
public List<NameClassPair> list(Name name) throws NamingException
Description copied from interface:NamingStoreList the NameClassPair instances for the provided name. An entry for this name must already exist and be bound to a valid context.- Specified by:
listin interfaceNamingStore- Parameters:
name- The entry name- Returns:
- The NameClassPair instances
- Throws:
NamingException- If any errors occur
-
listBindings
public List<Binding> listBindings(Name name) throws NamingException
Description copied from interface:NamingStoreList the binding objects for a specified name. An entry for this name must already exist and be bound to a valid context.- Specified by:
listBindingsin interfaceNamingStore- Parameters:
name- The entry name- Returns:
- The bindings
- Throws:
NamingException- If any errors occur
-
close
public void close() throws NamingExceptionDescription copied from interface:NamingStoreClose the naming store and cleanup any resource used by the store.- Specified by:
closein interfaceNamingStore- Throws:
NamingException- If any errors occur
-
addNamingListener
public void addNamingListener(Name target, int scope, NamingListener listener)
Description copied from interface:NamingStoreAdd aNamingListenerfor a specific target and scope.- Specified by:
addNamingListenerin interfaceNamingStore- Parameters:
target- The target name to add the listener toscope- The listener scopelistener- The listener
-
removeNamingListener
public void removeNamingListener(NamingListener listener)
Description copied from interface:NamingStoreRemove aNamingListenerfrom all targets and scopes- Specified by:
removeNamingListenerin interfaceNamingStore- Parameters:
listener- The listener
-
add
public void add(org.jboss.msc.service.ServiceName serviceName)
-
remove
public void remove(org.jboss.msc.service.ServiceName serviceName)
-
buildServiceName
protected org.jboss.msc.service.ServiceName buildServiceName(Name name)
-
getServiceNameBase
protected org.jboss.msc.service.ServiceName getServiceNameBase()
-
getServiceRegistry
protected org.jboss.msc.service.ServiceRegistry getServiceRegistry()
-
getBaseName
public Name getBaseName() throws NamingException
Description copied from interface:NamingStoreRetrieves the store's base name, which is the prefix for the absolute name of each entry in the store.- Specified by:
getBaseNamein interfaceNamingStore- Returns:
- Throws:
NamingException
-
-