|
||||||||||
| 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 String |
BRACKLEFT
|
static String |
BRACKRIGHT
|
static String |
COMMA
|
static String |
DOT
|
| Constructor Summary | |
|---|---|
FragmentUtil()
|
|
| Method Summary | |
|---|---|
static String |
getAttributeName(String name)
Get the attribute name from the attribute fragment name |
static String |
getElementName(String fragmentName)
Get the name of an element from a fragment name. |
static String |
getElementName(String name,
String attributeName)
Get the first attribute element's name in a String having the following expected format: |
static String |
getIndexes(String name,
String attributeName)
Get the indexes in an indexed attribute element having the following expected format: |
static String |
getItemName(String fragmentName)
Get the name of an item's key from a fragment name. |
static String |
getKeyName(String name,
String attributeName)
|
static String |
getNameForArrayElement(String name,
String index)
Generate the name of an element of an Array. |
static String |
getNameForElem(String name,
String elemName)
Generate the name of a fragment corresponding to an Array or TabularData's item |
static String |
getNameForItem(String name,
String key)
Generate the name of a fragment corresponding to a CompositeData's item. |
static String |
getNameForTabularElement(String name,
Object[] indexes)
Generate the name of a fragment corresponding to a row of in a TabularData |
static boolean |
isFragmentName(String name)
|
static String |
nameForIndexElement(String name,
String index)
Generate the name of an element of indexed object. |
static String |
nameForItem(String name,
String key)
Generate the name of a fragment corresponding to a CompositeData's item. |
static boolean |
nextElementIsIndex(String name,
String attributeName)
Check if the first attribute element in the given String corresponds to an indexed element. |
static boolean |
nextElementIsKey(String name,
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 String DOT
public static String COMMA
public static String BRACKLEFT
public static String BRACKRIGHT
| Constructor Detail |
|---|
public FragmentUtil()
| Method Detail |
|---|
public static boolean isFragmentName(String name)
name - attribute or fragment name
public static String getNameForItem(String name,
String key)
name - composite's namekey - the item's name
public static String getNameForElem(String name,
String elemName)
name - elemName -
public static String getNameForArrayElement(String name,
String index)
name - the name of the Array attribute or fragmentindex - the element's index
public static String getNameForTabularElement(String name,
Object[] indexes)
name - the name of the TabularData attribute or fragmentindexes - the row's indexes
public static String getItemName(String fragmentName)
throws FragmentNameException
fragmentName - fragment name
FragmentNameException - A key name could not be identified.
public static String getElementName(String fragmentName)
throws FragmentNameException
fragmentName - fragment name
FragmentNameException
public static String nameForIndexElement(String name,
String index)
name - the name associated to the indexed object.index - the element's index
public static String nameForItem(String name,
String key)
name - composite's namekey - the item's name
public static String getAttributeName(String name)
throws FragmentNameException
name - attribute fragment name
FragmentNameException - An attribute name could not be identified as no
DOT nor BRACKLEFT found.
public static String getKeyName(String name,
String attributeName)
public static String getIndexes(String name,
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 String getElementName(String name,
String attributeName)
throws FragmentNameException
name - The String to process.attributeName - The supposed starting attribute name
FragmentNameException
public static boolean nextElementIsKey(String name,
String attributeName)
throws FragmentNameException
name - A String having the expected format: attributeName - The supposed starting attribute name
FragmentNameException
public static boolean nextElementIsIndex(String name,
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 | |||||||||