|
||||||||||
| 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.FragmentUtil
public class FragmentUtil
Manage JMX Attribute fragments. Attribute fragments are elements of complex attributes. Sometimes, users need to poll such attribute elements, for example an item in a Map, and don't need the entire attribute value. A naming policy is necessary to define the attributes elements to be polled by a JMX indicator. Also, when a JMX indicator specifies an attribute (or an attribute fragment) whose value has a complex type, the value must be decomposed in simple elements (elementary fragments). The naming policy is used to identify the fragments returned by a probe polling this indicator.
| Field Summary | |
|---|---|
static java.lang.String |
BRACKLEFT
|
static java.lang.String |
BRACKRIGHT
|
static java.lang.String |
COMMA
|
static java.lang.String |
DOT
|
| Constructor Summary | |
|---|---|
FragmentUtil()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
getAttributeName(java.lang.String name)
Get the name of the attribute from a fragment's name |
static java.lang.String |
getElementName(java.lang.String fragmentName)
Get the name of an element from a fragment name. |
static java.util.List<javax.management.Attribute> |
getFragments(javax.management.Attribute att)
Decompose a JMX Attribute having a complex type into a list of Attributes having simple types (the fragments). |
static java.lang.String |
getItemName(java.lang.String fragmentName)
Get the name of an item's key from a fragment name. |
static java.lang.String |
getNameForArrayElement(java.lang.String name,
java.lang.String index)
Generate the name of an element of an Array. |
static java.lang.String |
getNameForItem(java.lang.String name,
java.lang.String key)
Generate the name of a fragment corresponding to a CompositeData's item. |
static java.lang.String |
getNameForTabularElement(java.lang.String name,
java.lang.Object[] indexes)
Generate the name of a fragment corresponding to a row of in a TabularData |
static boolean |
isFragmentName(java.lang.String name)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String DOT
public static java.lang.String COMMA
public static java.lang.String BRACKLEFT
public static java.lang.String BRACKRIGHT
| Constructor Detail |
|---|
public FragmentUtil()
| Method Detail |
|---|
public static java.util.List<javax.management.Attribute> getFragments(javax.management.Attribute att)
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.
public static boolean isFragmentName(java.lang.String name)
name - attribute or fragment name
public static java.lang.String getNameForItem(java.lang.String name,
java.lang.String key)
name - composite's namekey - the item's name
public static java.lang.String getNameForArrayElement(java.lang.String name,
java.lang.String index)
name - the name of the Array attribute or fragmentindex - the element's index
public static java.lang.String getNameForTabularElement(java.lang.String name,
java.lang.Object[] indexes)
name - the name of the TabularData attribute or fragmentindexes - the row's indexes
public static java.lang.String getAttributeName(java.lang.String name)
throws FragmentNameException
name - fragment name
FragmentNameException - An attribute name could not be identified as no
DOT nor BRACKLEFT found.
public static java.lang.String getItemName(java.lang.String fragmentName)
throws FragmentNameException
fragmentName - fragment name
FragmentNameException - A key name could not be identified.
public static java.lang.String getElementName(java.lang.String fragmentName)
throws FragmentNameException
fragmentName - fragment name
FragmentNameException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||