Methods Summary |
---|
public java.lang.String | createMBean(java.lang.String target, java.lang.String className)Creates an MBean with given className in given target. Results in the call to
#createMBean(String, String, Map, Map).
The Map will be empty, so will be Map.
|
public java.lang.String | createMBean(java.lang.String target, java.util.Map params)Creates an MBean with given className in given target. Results in the call to
#createMBean(String, String, Map, Map).
The Map should contain the 0 or more items from the @link{CustomMBeanConstants}
class.
- class-name of the custom mbean, which is mandatory
- name of the custom mbean
- object-name of the custom mbean
|
public java.lang.String | createMBean(java.lang.String target, java.util.Map params, java.util.Map attributes)Creates an MBean with given class-name in the given target's configuration.
The class-name may not be null. The class must represent a valid JMX MBean implementation.
All the standard requirements must be fulfilled by the given class. Here is a list of
requirements from the given class-name. It is by no means an exhaustive one. Refer to
the design document for the complete list.
- The class-name may not be null
- It must be instantiable with a default constructor
- The class bits must be available in order to be loaded dynamically, knowing full name
Refer to the class Javadoc for a note on target.
The various mappings in the params map are as follows:
- String CustomMBeanConstants.NAME_KEY -> name of the MBean
- Mandatory String CustomMBeanConstants.IMPL_CLASS_NAME_KEY -> the actual class
- String CustomMBeanConstants.OBJECT_NAME_KEY -> intended ObjectName of the MBean
|
public void | createMBeanRef(java.lang.String target, java.lang.String ref)Creates a reference to the given MBean. It is a misnomer in that it actually creates an application-ref
sub-element in a server, but it is named so for functional clarity. This is available only in
EE of appserver because it is against a precedent to create references in PE.
|
public java.lang.String | deleteMBean(java.lang.String target, java.lang.String name)Deletes the MBean with the given name from the configuration and optionally deletes the corresponding
classes from the file system. The deletion of classes should not be relied upon by the clients.
Refer to the design document for exact semantics of this method.
|
public void | deleteMBeanRef(java.lang.String target, java.lang.String ref)Deletes a reference to the given MBean from a server or cluster. It is a misnomer in that it actually deletes an application-ref
sub-element from a server, but it is named so for functional clarity. This is available only in
EE of appserver because it is against a precedent to delete references in PE.
|
public javax.management.MBeanInfo | getMBeanInfo(java.lang.String classname)Return the MBeanInfo of a given Custom MBean.
The MBean must be loadable from the standard App Server location.
The code does this:
- Register the MBean in the MBeanServer
- Fetch and save the MBeanInfo
- Unregister the MBean
Note that if the MBean can't be deployed successfully then this method won't work.
|