[
http://jira.jboss.com/jira/browse/JGRP-408?page=all ]
Bela Ban updated JGRP-408:
--------------------------
Fix Version/s: 2.x
(was: 2.6)
Moved to 2.x. JMX 7 (part of Java 7) includes this feature, so we can use it out of the
box in a later version of JGroups, allowing us to remove the parallel JMX class/interface
hierarchy
Expose classes, attributes and operations via @ManagedResource,
@ManagedAttribute and @ManagedOperation
-------------------------------------------------------------------------------------------------------
Key: JGRP-408
URL:
http://jira.jboss.com/jira/browse/JGRP-408
Project: JGroups
Issue Type: Feature Request
Affects Versions: 2.4
Reporter: Bela Ban
Assigned To: Bela Ban
Fix For: 2.x
We should be able to simply make an object expose management information by annotating
it.
Input: annotations and classes
Output: classes which are registered with the platform MBeanServer at runtime using an
API (which is also provided). This API
uses the annotations and reflection to create DynamicMBeans (or MXBeans ?) which are then
registered with the MBeanServer.
Example:
@ManagedResource(objectName="jgroups:type=protocol;name=UDP")
public class UDP extends Protocol {
@ManagedAttribute(name="Sent", descr="Number of bytes sent")
long sent_msgs=0; // generates a 'public long getSent()' getter, *no* setter !
@ManagedOperation(description="Prints statistics over the last N seconds")
@Parameters({@Parameter(name="timeframe", description="Number of
milliseconds (0 for all stats)")})
public String printStats(long timeframe) {
// implement;
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira