You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Object MBean

Description

QMan JMX representation of a Qpid domain object exposed for management / monitoring. Note that there will be an object MBean for each management object on Qpid.
This chapter refers to the abstract interface that object will have.

Object Name

Q-MAN:brokerId=<BROKER_ID>,type=Object,package=<PACKAGE_NAME>,class=<CLASS_NAME>,objectId=<OBJECT_ID>

where :

Name

Description

Example

Q-MAN

QMan management domain. This is a fixed value.

N.A.

BROKER_ID

Broker identifier. This is a UUID assigned to each connected broker. Basically it indicates the (broker) owner of this object.

5004341d-7f3e-444a-b240-7d48030599f9

PACKAGE_NAME

The package name. A package is a grouping of class definitions that are related to a single software component. The package concept is used to extend the management schema beyond just the QPID software components.

org.apache.qpid.broker

CLASS_NAME

The class name. A class is a type definition for a manageable object.

queue, session, connection

Attributes

Object MBean attributes can be classifiled under two categories :

  • Properties : typed members of object (that is, of its class definition) which represent a configurable attribute of the class. In general, properties don't change frequently or may not change at all;
  • Statistics : typed members of object(that is, of its class definition) which represents an instrumentation attribute of the class. Statistics are always read-only in nature and tend to change rapidly.

The JMX interface of an object 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());
		}
	}
}

Operations

getAttribute

setAttribute

invoke

Operation Name

Description

Return Type

Argument Name

Description

Type

Nullable

Note

Example
 

Notifications

N.A.

  • No labels