|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Implementations of this interface can be plugged into the MBeanServer, to control the registration and deregistration of MBeans.
The registry can expose itself for management under the object name
defined the name defined in ServerConstants
(src)
When this is the case, the MBeanServer will perform the
register/unregister operations dynamically.
Revisions:
20030806 Juha Lindfors:
-
Added releaseRegistry() method to the interface as per the patch
submitted by Rod Burgett (Bug Tracker: #763378)
(src) Field Summary |
Method Summary | |
boolean |
contains(ObjectName (src) name)
Test whether an object name is registered. |
java.util.List |
findEntries(ObjectName (src) pattern)
Return a List of MBeanEntry objects with ObjectNames that match the specified pattern. |
MBeanEntry (src) |
get(ObjectName (src) name)
Retrieve the registration for an object name. |
java.lang.String |
getDefaultDomain()
Retrieve the default domain for this registry. |
java.lang.String[] |
getDomains()
Retrieve the domains for this registry. |
ObjectInstance (src) |
getObjectInstance(ObjectName (src) name)
Retrieve the object instance for an object name. |
int |
getSize()
Retrieve the number of mbeans registered. |
java.lang.Object |
getValue(ObjectName (src) name,
java.lang.String key)
Retrieve a value from the registration. |
ObjectInstance (src) |
registerMBean(java.lang.Object object,
ObjectName (src) name,
java.util.Map valueMap)
Register an mbean. |
void |
releaseRegistry()
Invoked before the MBean server instance is released. |
void |
unregisterMBean(ObjectName (src) name)
Unregister an mbean. |
Method Detail |
public ObjectInstance (src) registerMBean(java.lang.Object object, ObjectName (src) name, java.util.Map valueMap) throws InstanceAlreadyExistsException (src) , MBeanRegistrationException (src) , NotCompliantMBeanException (src)
This method is invoked by the MBeanServer for createMBean() and registerMBean().
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 JMI_DOMAIN
in
both the key and values of the values map to get access to the reserved
domain. It is removed from the map during registration to save memory.
Pass 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 (src)
- when the object name
is already registered.
MBeanRegistrationException (src)
- when an exception is raised
during preRegister for the mbean.
NotCompliantMBeanException (src)
- when the passed object is
a valid mbean.public void unregisterMBean(ObjectName (src) name) throws InstanceNotFoundException (src) , MBeanRegistrationException (src)
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 (src)
- when the object name is
not registered.
MBeanRegistrationException (src)
- when an exception is raised
during preDeregister for the mbean.public MBeanEntry (src) get(ObjectName (src) name) throws InstanceNotFoundException (src)
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 (src)
- when the object name is not
registered.public java.lang.String getDefaultDomain()
public java.lang.String[] getDomains()
public ObjectInstance (src) getObjectInstance(ObjectName (src) name) throws InstanceNotFoundException (src)
name
- the object name of the mbean
InstanceNotFoundException (src)
- when the object name is not
registeredpublic java.lang.Object getValue(ObjectName (src) name, java.lang.String key) throws InstanceNotFoundException (src)
name
- the object name of the mbeankey
- the key to the value
InstanceNotFoundException (src)
- when the object name is not
registeredpublic boolean contains(ObjectName (src) name)
This method is invoked by the MBeanServer for isRegistered().
The object name passed maybe unqualified.
name
- the object name
public java.util.List findEntries(ObjectName (src) pattern)
This method is invoked by the MBeanServer for queryMBeans() and queryNames().
pattern
- the pattern to match
public int getSize()
This method is invoked by the MBeanServer for getMBeanCount().
public void releaseRegistry()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |