APIdia Launch Partner
Top Description Inners Constructors Methods
com.sun.jmx.mbeanserver

pack-priv abstract Class MBeanIntrospector<M>

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.jmx.mbeanserver.StandardMBeanIntrospector, com.sun.jmx.mbeanserver.MXBeanIntrospector
Type Parameters
<M>
the representation of methods for this kind of MBean: Method for Standard MBeans, ConvertingMethod for MXBeans.
Static Imports
com.sun.jmx.mbeanserver.Util.*

An introspector for MBeans of a certain type. There is one instance of this class for Standard MBeans, and one for every MXBeanMappingFactory; these two cases correspond to the two concrete subclasses of this abstract class.
Since
1.6

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
MBeanIntrospector.MBeanInfoMaker

A visitor that constructs the per-interface MBeanInfo.

pack-priv static class
pack-priv static class

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract void
checkMethod(M m)

Check that this method is valid.

pack-priv final boolean
consistent(M getter, M setter)

True if the given getter and setter are consistent.

private static MBeanConstructorInfo[]
pack-priv static MBeanNotificationInfo[]
pack-priv abstract MBeanAnalyzer<M>
getAnalyzer(Class<?> mbeanInterface)

Make an interface analyzer for this type of MBean.

pack-priv abstract Descriptor
getBasicMBeanDescriptor()

Get a Descriptor containing fields that MBeans of this kind will always have.

pack-priv final MBeanInfo
getClassMBeanInfo(Class<?> resourceClass, PerInterface<M> perInterface)

Return the basic MBeanInfo for resources of the given class and per-interface data.

pack-priv abstract Type[]
getGenericParameterTypes(M m)

Get the parameter types of this method in the Java interface it came from.

pack-priv abstract Type
getGenericReturnType(M m)

Get the return type of this method.

pack-priv abstract MBeanAttributeInfo
getMBeanAttributeInfo(String attributeName, M getter, M setter)

Construct an MBeanAttributeInfo for the given attribute based on the given getter and setter.

pack-priv abstract Descriptor
getMBeanDescriptor(Class<?> resourceClass)

Get a Descriptor containing additional fields beyond the ones from getBasicMBeanDescriptor that MBeans whose concrete class is resourceClass will always have.

pack-priv final MBeanInfo
getMBeanInfo(Object resource, PerInterface<M> perInterface)

Return the MBeanInfo for the given resource, based on the given per-interface data.

pack-priv abstract MBeanIntrospector.MBeanInfoMap
getMBeanInfoMap()

The map from concrete implementation class and interface to MBeanInfo for this type of MBean.

pack-priv abstract MBeanOperationInfo
getMBeanOperationInfo(String operationName, M operation)

Construct an MBeanOperationInfo for the given operation based on the M it was derived from.

pack-priv final List<Method>
getMethods(final Class<?> mbeanType)

Get the methods to be analyzed to build the MBean interface.

pack-priv abstract String
getName(M m)

Get the name of this method.

pack-priv final PerInterface<M>
getPerInterface(Class<?> mbeanInterface)

pack-priv abstract MBeanIntrospector.PerInterfaceMap<M>
getPerInterfaceMap()

The map from interface to PerInterface for this type of MBean.

pack-priv abstract String[]
getSignature(M m)

Get the signature of this method as a caller would have to supply it in MBeanServer.invoke.

pack-priv final Object
invokeM(M m, Object target, Object[] args, Object cookie)

Invoke the given M on the given target with the given args and cookie.

pack-priv abstract Object
invokeM2(M m, Object target, Object[] args, Object
Additional information about the target. For an MXBean, this is the MXBeanLookup associated with the MXBean.
cookie
)

Invoke the method with the given target and arguments.

pack-priv final void
invokeSetter(String name, M setter, Object target, Object arg, Object cookie)

Invoke the given setter on the given target with the given argument and cookie.

pack-priv abstract boolean
isMXBean()

True if MBeans with this kind of introspector are MXBeans.

pack-priv static boolean
isValidParameter(Method m, Object value, int paramNo)

private MBeanInfo
makeInterfaceMBeanInfo(Class<?> mbeanInterface, MBeanAnalyzer<M> analyzer)

Make the MBeanInfo skeleton for the given MBean interface using the given analyzer.

private void
maybeInvalidParameter(String name, M setter, Object arg, Object cookie)

pack-priv abstract M
mFrom(Method m)

Find the M corresponding to the given Method.

private static void
pack-priv abstract boolean
validParameter(M m, Object value, int paramNo, Object cookie)

Test whether the given value is valid for the given parameter of this M.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

MBeanIntrospectorback to summary
pack-priv MBeanIntrospector()

Method Detail

checkMethodback to summary
pack-priv abstract void checkMethod(M m)

Check that this method is valid. For example, a method in an MXBean interface is not valid if one of its parameters cannot be mapped to an Open Type.

consistentback to summary
pack-priv final boolean consistent(M getter, M setter)

True if the given getter and setter are consistent.

findConstructorsback to summary
private static MBeanConstructorInfo[] findConstructors(Class<?> c)
findNotificationsback to summary
pack-priv static MBeanNotificationInfo[] findNotifications(Object moi)
getAnalyzerback to summary
pack-priv abstract MBeanAnalyzer<M> getAnalyzer(Class<?> mbeanInterface) throws NotCompliantMBeanException

Make an interface analyzer for this type of MBean.

getBasicMBeanDescriptorback to summary
pack-priv abstract Descriptor getBasicMBeanDescriptor()

Get a Descriptor containing fields that MBeans of this kind will always have. For example, MXBeans will always have "mxbean=true".

getClassMBeanInfoback to summary
pack-priv final MBeanInfo getClassMBeanInfo(Class<?> resourceClass, PerInterface<M> perInterface)

Return the basic MBeanInfo for resources of the given class and per-interface data. This MBeanInfo might not be the final MBeanInfo for instances of the class, because if the class is a NotificationBroadcaster then each instance gets to decide what MBeanNotificationInfo[] to put in its own MBeanInfo.

getGenericParameterTypesback to summary
pack-priv abstract Type[] getGenericParameterTypes(M m)

Get the parameter types of this method in the Java interface it came from.

getGenericReturnTypeback to summary
pack-priv abstract Type getGenericReturnType(M m)

Get the return type of this method. This is the return type of a method in a Java interface, so for MXBeans it is the declared Java type, not the mapped Open Type.

getMBeanAttributeInfoback to summary
pack-priv abstract MBeanAttributeInfo getMBeanAttributeInfo(String attributeName, M getter, M setter)

Construct an MBeanAttributeInfo for the given attribute based on the given getter and setter. One but not both of the getter and setter may be null.

getMBeanDescriptorback to summary
pack-priv abstract Descriptor getMBeanDescriptor(Class<?> resourceClass)

Get a Descriptor containing additional fields beyond the ones from getBasicMBeanDescriptor that MBeans whose concrete class is resourceClass will always have.

getMBeanInfoback to summary
pack-priv final MBeanInfo getMBeanInfo(Object resource, PerInterface<M> perInterface)

Return the MBeanInfo for the given resource, based on the given per-interface data.

getMBeanInfoMapback to summary
pack-priv abstract MBeanIntrospector.MBeanInfoMap getMBeanInfoMap()

The map from concrete implementation class and interface to MBeanInfo for this type of MBean.

getMBeanOperationInfoback to summary
pack-priv abstract MBeanOperationInfo getMBeanOperationInfo(String operationName, M operation)

Construct an MBeanOperationInfo for the given operation based on the M it was derived from.

getMethodsback to summary
pack-priv final List<Method> getMethods(final Class<?> mbeanType)

Get the methods to be analyzed to build the MBean interface.

getNameback to summary
pack-priv abstract String getName(M m)

Get the name of this method.

getPerInterfaceback to summary
pack-priv final PerInterface<M> getPerInterface(Class<?> mbeanInterface) throws NotCompliantMBeanException
getPerInterfaceMapback to summary
pack-priv abstract MBeanIntrospector.PerInterfaceMap<M> getPerInterfaceMap()

The map from interface to PerInterface for this type of MBean.

getSignatureback to summary
pack-priv abstract String[] getSignature(M m)

Get the signature of this method as a caller would have to supply it in MBeanServer.invoke. For MXBeans, the named types will be the mapped Open Types for the parameters.

invokeMback to summary
pack-priv final Object invokeM(M m, Object target, Object[] args, Object cookie) throws MBeanException, ReflectionException

Invoke the given M on the given target with the given args and cookie. Wrap exceptions appropriately.

invokeM2back to summary
pack-priv abstract Object invokeM2(M m, Object target, Object[] args, Object cookie) throws InvocationTargetException, IllegalAccessException, MBeanException

Invoke the method with the given target and arguments.

Parameters
cookie:Object

Additional information about the target. For an MXBean, this is the MXBeanLookup associated with the MXBean.

invokeSetterback to summary
pack-priv final void invokeSetter(String name, M setter, Object target, Object arg, Object cookie) throws MBeanException, ReflectionException, InvalidAttributeValueException

Invoke the given setter on the given target with the given argument and cookie. Wrap exceptions appropriately.

isMXBeanback to summary
pack-priv abstract boolean isMXBean()

True if MBeans with this kind of introspector are MXBeans.

isValidParameterback to summary
pack-priv static boolean isValidParameter(Method m, Object value, int paramNo)
makeInterfaceMBeanInfoback to summary
private MBeanInfo makeInterfaceMBeanInfo(Class<?> mbeanInterface, MBeanAnalyzer<M> analyzer)

Make the MBeanInfo skeleton for the given MBean interface using the given analyzer. This will never be the MBeanInfo of any real MBean (because the getClassName() must be a concrete class), but its MBeanAttributeInfo[] and MBeanOperationInfo[] can be inserted into such an MBeanInfo, and its Descriptor can be the basis for the MBeanInfo's Descriptor.

maybeInvalidParameterback to summary
private void maybeInvalidParameter(String name, M setter, Object arg, Object cookie) throws InvalidAttributeValueException
mFromback to summary
pack-priv abstract M mFrom(Method m)

Find the M corresponding to the given Method.

unwrapInvocationTargetExceptionback to summary
private static void unwrapInvocationTargetException(InvocationTargetException e) throws MBeanException
validParameterback to summary
pack-priv abstract boolean validParameter(M m, Object value, int paramNo, Object cookie)

Test whether the given value is valid for the given parameter of this M.

com.sun.jmx.mbeanserver back to summary

private Class MBeanIntrospector.MBeanInfoMaker

extends Object
implements MBeanAnalyzer.MBeanVisitor<M>
Class Inheritance
All Implemented Interfaces
com.sun.jmx.mbeanserver.MBeanAnalyzer.MBeanVisitor

A visitor that constructs the per-interface MBeanInfo.

Field Summary

Modifier and TypeField and Description
private final List<MBeanAttributeInfo>
private final List<MBeanOperationInfo>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv MBeanInfo
makeMBeanInfo(Class<?> mbeanInterface, String description)

Make an MBeanInfo based on the attributes and operations found in the interface.

public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

attrsback to summary
private final List<MBeanAttributeInfo> attrs
opsback to summary
private final List<MBeanOperationInfo> ops

Constructor Detail

MBeanInfoMakerback to summary
private MBeanInfoMaker()

Method Detail

makeMBeanInfoback to summary
pack-priv MBeanInfo makeMBeanInfo(Class<?> mbeanInterface, String description)

Make an MBeanInfo based on the attributes and operations found in the interface.

visitAttributeback to summary
public void visitAttribute(String attributeName, M getter, M setter)

Implements com.sun.jmx.mbeanserver.MBeanAnalyzer.MBeanVisitor.visitAttribute.

visitOperationback to summary
public void visitOperation(String operationName, M operation)

Implements com.sun.jmx.mbeanserver.MBeanAnalyzer.MBeanVisitor.visitOperation.

com.sun.jmx.mbeanserver back to summary

pack-priv Class MBeanIntrospector.MBeanInfoMap

extends WeakHashMap<Class<?>, WeakHashMap<Class<?>, MBeanInfo>>
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from java.util.WeakHashMap:
clearcontainsKeycontainsValueentrySetforEachgetisEmptykeySetnewWeakHashMapputputAllremovereplaceAllsizevalues

Constructor Detail

MBeanInfoMapback to summary
pack-priv MBeanInfoMap()
com.sun.jmx.mbeanserver back to summary

pack-priv final Class MBeanIntrospector.PerInterfaceMap<M>

extends WeakHashMap<Class<?>, WeakReference<PerInterface<M>>>
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from java.util.WeakHashMap:
clearcontainsKeycontainsValueentrySetforEachgetisEmptykeySetnewWeakHashMapputputAllremovereplaceAllsizevalues

Constructor Detail

PerInterfaceMapback to summary
pack-priv PerInterfaceMap()