|
||||||||||
| 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 attribute name from the attribute fragment name |
static java.lang.String |
getElementName(java.lang.String fragmentName)
Get the name of an element from a fragment name. |
static java.lang.String |
getElementName(java.lang.String name,
java.lang.String attributeName)
Get the first attribute element's name in a String having the following expected format: |
static java.lang.String |
getIndexes(java.lang.String name,
java.lang.String attributeName)
Get the indexes in an indexed attribute element having the following expected format: |
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 |
getKeyName(java.lang.String name,
java.lang.String attributeName)
|
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 |
getNameForElem(java.lang.String name,
java.lang.String elemName)
Generate the name of a fragment corresponding to an Array or TabularData's item |
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)
|
static java.lang.String |
nameForIndexElement(java.lang.String name,
java.lang.String index)
Generate the name of an element of indexed object. |
static java.lang.String |
nameForItem(java.lang.String name,
java.lang.String key)
Generate the name of a fragment corresponding to a CompositeData's item. |
static boolean |
nextElementIsIndex(java.lang.String name,
java.lang.String attributeName)
Check if the first attribute element in the given String corresponds to an indexed element. |
static boolean |
nextElementIsKey(java.lang.String name,
java.lang.String attributeName)
Check if the first attribute element in the given String corresponds to a key element |
| 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 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 getNameForElem(java.lang.String name,
java.lang.String elemName)
attName - elemName -
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 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
public static java.lang.String nameForIndexElement(java.lang.String name,
java.lang.String index)
name - the name associated to the indexed object.index - the element's index
public static java.lang.String nameForItem(java.lang.String name,
java.lang.String key)
name - composite's namekey - the item's name
public static java.lang.String getAttributeName(java.lang.String name)
throws FragmentNameException
name - attribute fragment name
FragmentNameException - An attribute name could not be identified as no
DOT nor BRACKLEFT found.
public static java.lang.String getKeyName(java.lang.String name,
java.lang.String attributeName)
public static java.lang.String getIndexes(java.lang.String name,
java.lang.String attributeName)
throws FragmentNameException
name - The String to process.attributeName - The supposed starting attribute name
FragmentNameException - the given String does not have the expected format
public static java.lang.String getElementName(java.lang.String name,
java.lang.String attributeName)
throws FragmentNameException
name - The String to process.attributeName - The supposed starting attribute name
FragmentNameException
public static boolean nextElementIsKey(java.lang.String name,
java.lang.String attributeName)
throws FragmentNameException
name - A String having the expected format: attributeName - The supposed starting attribute name
FragmentNameException
public static boolean nextElementIsIndex(java.lang.String name,
java.lang.String attributeName)
throws FragmentNameException
name - A String having the expected format: attributeName - The supposed starting attribute name
FragmentNameException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||