|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.jasmine.probe.collectors.jmx.internal.JmxUtil
public class JmxUtil
Support for access to MBean attributes and attribute fragments.
| Constructor Summary | |
|---|---|
JmxUtil()
|
|
| Method Summary | |
|---|---|
static Attribute |
createNewIndexedAttribute(String contName,
String index,
Object elemValue)
Create a new Attribute instance for an indexed element. |
static Attribute |
createNewItemAttribute(String contName,
String key,
Object itemValue)
Create a new Attribute instance for a keyed item. |
static Attribute |
getAttributeFragment(String name,
Attribute att)
Return an Attribute object corresponding to the given attribute fragment name. |
static List<Attribute> |
getAttributeFragments(Attribute att)
Decompose a JMX Attribute having a complex type into a list of Attributes having simple types (the fragments). |
static List<String> |
getMBeanAttNames(MBeanServerConnection cnx,
ObjectName on)
Return a list of attribute names of a given MBean. |
static Set<ObjectName> |
getMBeans(MBeanServerConnection cnx,
ObjectName on)
Get all the MBeans corresponding to an ObjectName pattern. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JmxUtil()
| Method Detail |
|---|
public static Set<ObjectName> getMBeans(MBeanServerConnection cnx,
ObjectName on)
throws IOException
cnx - Connection to the MBean serveron - ObjectName pattern
IOException - A communication problem occurred when
talking to the MBean server.
public static List<String> getMBeanAttNames(MBeanServerConnection cnx,
ObjectName on)
throws IOException,
JMException
cnx - MBeanServer connectionon - The MBean's name.
IOException - A communication problem occurred when
talking to the MBean server.
JMException - A JMX exception occurred when using the MBean.
public static Attribute createNewIndexedAttribute(String contName,
String index,
Object elemValue)
contName - the name associated to the indexed objectindex - the element's indexelemValue - the value of the element having the given index
public static Attribute createNewItemAttribute(String contName,
String key,
Object itemValue)
contName - the name associated to the composite object (the container)key - the item's keyitemValue - the value of the item having the given key
public static Attribute getAttributeFragment(String name,
Attribute att)
throws FragmentNameException
cnx - Connection to the MBean serverobjname - MBean to pollname - attribute fragment namerootAtt - the MBean attribute containing this fragment
IOException - A communication problem occurred when
talking to the MBean server.
JMException - Problem with the JMX code.
FragmentNameException - exception related to the fragment naming policy
public static List<Attribute> getAttributeFragments(Attribute att)
throws ComplexValuesException
att - The initial attribute which may have a complex or a simple type.
It its value has a simple type, the attribute is returned as it is.
If it has a complex type, its value is decomposed in simple elements, the fragments.
ComplexValuesException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||