Event MBeanPage edited by Robbie GemmellChanges (1)
Full Content
Event MBeanEvents doesn't have operations because are representation of transient entities created on broker side. DescriptionQMan JMX representation of a Qpid event exposed for monitoring. Note that there will be an event MBean instance for each event produced on Qpid side. Object NameQ-MAN:brokerId=<BROKER_ID>,type=Event,package=<PACKAGE_NAME>,class=<CLASS_NAME>,objectId=<OBJECT_ID> where :
AttributesAn Event MBean is a JMX representation of something that happened on Qpid side. Its state is basically composed by the arguments The JMX interface of an event MBean lets you retrieve attributes metadata using the standard JMX API. The following example is showing that. Example : retrieving attributes metadata public class Example { public static void main(String[] args) throws Exception { MBeanServer server = ManagementFactory.getPlatformMBeanServer(); // Suppose the following is an object name associated with an existing managed domain instance. ObjectName objectName = ...; MBeanInfo mbeanMetadata = server.getMBeanInfo(objectName); // List all attributes (metadata, not values) for (MBeanAttributeInfo attribute : mbeanMetadata.getAttributes()) { System.out.println("Name : "+attribute.getName()); System.out.println("Description : "+attribute.getDescription()); System.out.println("Type : "+attribute.getType()); System.out.println("Is Readable : "+attribute.isReadable()); System.out.println("Is Writable : "+attribute.isWritable()); } } } OperationsgetAttribute
Example public class Example { public static void main(String[] args) throws Exception { MBeanServer server = ManagementFactory.getPlatformMBeanServer(); // Suppose that this is an object name corresponding to a valid managed domain instance. ObjectName objectName = ...; // Suppose the mbean has an attribute (a statistic in this case) PendingMessagesCount Long attributeValue = (Long) server.getAttribute(objectName, "PendingMessagesCount"); System.out.println("Attribute Value : "+attributeValue); } } NotificationsN.A.
Change Notification Preferences
View Online
|
View Changes
|
Add Comment
|
