|
JBossMX Parent POM 6.0.0.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.jmx.mbeanserver.JBossMBeanRegistry
public class JBossMBeanRegistry
JBossMBeanRegistry.
Constructor Summary | |
---|---|
JBossMBeanRegistry(MBeanServer server)
Create a new JBossMBeanRegistry. |
Method Summary | |
---|---|
protected void |
add(org.jboss.jmx.mbeanserver.RegistryEntry entry)
Adds an MBean entry |
boolean |
contains(ObjectName name)
Test whether an object name is registered. |
org.jboss.jmx.mbeanserver.RegistryEntry |
get(ObjectName name)
Retrieve the registration for an object name. |
org.jboss.jmx.mbeanserver.RegistryEntry |
get(ObjectName name,
boolean errorIfNotFound)
Retrieve the registration for an object name. |
String |
getDefaultDomain()
Retrieve the default domain for this registry. |
String[] |
getDomains()
Retrieve the domains for this registry. |
ObjectInstance |
getObjectInstance(ObjectName name)
|
int |
getSize()
Retrieve the number of mbeans registered. |
Object |
getValue(ObjectName name,
String key)
Retrieve the object instance for an object name. |
protected ObjectName |
qualifyName(ObjectName name)
Qualify an object name with the default domain |
ObjectInstance |
registerMBean(Object object,
ObjectName name,
Map<String,Object> valueMap)
Register an mbean. |
protected void |
remove(ObjectName name)
Removes an MBean entry |
void |
unregisterMBean(ObjectName name)
Unregister an mbean. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JBossMBeanRegistry(MBeanServer server)
server
- the serverMethod Detail |
---|
public ObjectInstance registerMBean(Object object, ObjectName name, Map<String,Object> valueMap) throws InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException
The object name passed maybe unqualified.
The map is a user definable string to value object map for holding information against a registered object. This map may contain metadata related to the registration, such as registration date/time, classloader references, etc.
Pass org.jboss.mx.classloader in the values map to set the context classloader
Other values are user definable and can be retrieved using the getValue(ObjectName,String) method.
object
- the mbean to register.name
- the object name to assign to the mbean.valueMap
- a map of other information to include in the
registry
InstanceAlreadyExistsException
- when the object name
is already registered.
MBeanRegistrationException
- when an exception is raised
during preRegister for the mbean.
NotCompliantMBeanException
- when the passed object is
a valid mbean.public void unregisterMBean(ObjectName name) throws InstanceNotFoundException, MBeanRegistrationException
This method is invoked by the MBeanServer for unregisterMBean().
The object name passed maybe unqualified.
MBeans in JMImplementation cannot be unregistered
name
- the mbean to unregister.
InstanceNotFoundException
- when the object name is
not registered.
MBeanRegistrationException
- when an exception is raised
during preDeregister for the mbean.public org.jboss.jmx.mbeanserver.RegistryEntry get(ObjectName name) throws InstanceNotFoundException
This method is invoked by the MBeanServer for methods passing an ObjectName that are not covered in other methods.
The object name passed maybe unqualified.
name
- the object name to retrieve
InstanceNotFoundException
- when the object name is not
registered.public org.jboss.jmx.mbeanserver.RegistryEntry get(ObjectName name, boolean errorIfNotFound) throws InstanceNotFoundException
This method is invoked by the MBeanServer for methods passing an ObjectName that are not covered in other methods.
The object name passed maybe unqualified.
name
- the object name to retrieveerrorIfNotFound
- whether to throw an error if not found
InstanceNotFoundException
- when the object name is not
registered.public String getDefaultDomain()
public String[] getDomains()
public ObjectInstance getObjectInstance(ObjectName name) throws InstanceNotFoundException
InstanceNotFoundException
public Object getValue(ObjectName name, String key) throws InstanceNotFoundException
name
- the object name of the mbeankey
- the key to retrieve
InstanceNotFoundException
- when the object name is not
registeredpublic boolean contains(ObjectName name)
This method is invoked by the MBeanServer for isRegistered().
The object name passed maybe unqualified.
name
- the object name
public int getSize()
This method is invoked by the MBeanServer for getMBeanCount().
protected void add(org.jboss.jmx.mbeanserver.RegistryEntry entry) throws InstanceAlreadyExistsException
WARNING: The object name should be fully qualified.
entry
- the MBean entry to add
InstanceAlreadyExistsException
- when the MBean's object name
is already registeredprotected void remove(ObjectName name) throws InstanceNotFoundException
name
- the object name of the entry to remove
InstanceNotFoundException
- when the object name is not
registeredprotected ObjectName qualifyName(ObjectName name)
Adds the default domain if no domain is specified.
name
- the name to qualify
RuntimeOperationsException
- containing an
IllegalArgumentException when there is a problem
|
JBossMX Parent POM 6.0.0.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |