public class MBeanInfoData extends Object
list
request. The full structure in its JSON representation looks like below. The amount
of data included can be fine tuned in two ways:
maxDepth
parameter given at construction time, the size of the map can be restricted
(from top down){ <domain> : { <prop list> : { "attr" : { <attr name> : { "type" : <attribute type>, "desc" : <textual description of attribute>, "rw" : true/false }, .... }, "op" : { <operation name> : { "args" : [ { "type" : <argument type> "name" : <argument name> "desc" : <textual description of argument> }, ..... ], "ret" : <return type>, "desc" : <textual description of operation> }, ..... }, "not" : { "name" : <name>, "desc" : <desc>, "types" : [ <type1>, <type2> ] } }, .... }, .... }
Constructor and Description |
---|
MBeanInfoData(int pMaxDepth,
Stack<String> pPathStack,
boolean pUseCanonicalName)
Constructor taking a max depth.
|
Modifier and Type | Method and Description |
---|---|
void |
addMBeanInfo(MBeanInfo mBeanInfo,
ObjectName pName)
Add information about an MBean as obtained from an
MBeanInfo descriptor. |
void |
handleException(ObjectName pName,
IllegalStateException pExp)
Add an exception which occurred during extraction of an
MBeanInfo for
a certain ObjectName to this map. |
void |
handleException(ObjectName pName,
InstanceNotFoundException pExp)
Add an exception which occurred during extraction of an
MBeanInfo for
a certain ObjectName to this map. |
void |
handleException(ObjectName pName,
IOException pExp)
Add an exception which occurred during extraction of an
MBeanInfo for
a certain ObjectName to this map. |
boolean |
handleFirstOrSecondLevel(ObjectName pName)
The first two levels of this map (tree) consist of the MBean's domain name and name properties, which are
independent of an MBean's meta data.
|
Object |
truncate()
Extract either a sub tree or a leaf value.
|
public MBeanInfoData(int pMaxDepth, Stack<String> pPathStack, boolean pUseCanonicalName)
pMaxDepth
- max depthpPathStack
- the stack for restricting the information to add. The given stack will be cloned
and is left untouched.pUseCanonicalName
- whether to use canonical name in listingspublic boolean handleFirstOrSecondLevel(ObjectName pName)
pName
- the objectname used for the first two levelspublic void addMBeanInfo(MBeanInfo mBeanInfo, ObjectName pName) throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException
MBeanInfo
descriptor. The information added
can be restricted by a given path (which has already be prepared as a stack). Also, a max depth as given in the
constructor restricts the size of the map from the top.mBeanInfo
- the MBean infopName
- the object name of the MBeanInstanceNotFoundException
IntrospectionException
ReflectionException
IOException
public void handleException(ObjectName pName, IOException pExp) throws IOException
MBeanInfo
for
a certain ObjectName
to this map.pName
- MBean name for which the error occurredpExp
- exception occurredIOException
- if this method decides to rethrow the execptionpublic void handleException(ObjectName pName, IllegalStateException pExp)
MBeanInfo
for
a certain ObjectName
to this map.pName
- MBean name for which the error occurredpExp
- exception occurredIllegalStateException
- if this method decides to rethrow the exceptionpublic void handleException(ObjectName pName, InstanceNotFoundException pExp) throws InstanceNotFoundException
MBeanInfo
for
a certain ObjectName
to this map.pName
- MBean name for which the error occurredpExp
- exception occurredIllegalStateException
- if this method decides to rethrow the exceptionInstanceNotFoundException
public Object truncate()
Copyright © 2018. All rights reserved.