AbstractReflectiveMBeanInfoAssembler that allows for
the management interface of a bean to be defined using arbitrary interfaces.
Any methods or properties that are defined in those interfaces are exposed
as MBean operations and attributes.
By default, this class votes on the inclusion of each operation or attribute
based on the interfaces implemented by the bean class. However, you can supply an
array of interfaces via the managedInterfaces property that will be
used instead. If you have multiple beans and you wish each bean to use a different
set of interfaces, then you can map bean keys (that is the name used to pass the
bean to the MBeanExporter) to a list of interface names using the
interfaceMappings property.
If you specify values for both interfaceMappings and
managedInterfaces, Spring will attempt to find interfaces in the
mappings first. If no interfaces for the bean are found, it will use the
interfaces defined by managedInterfaces.
setManagedInterfaces, setInterfaceMappings, MethodNameBasedMBeanInfoAssembler, SimpleReflectiveMBeanInfoAssembler, org.springframework.jmx.export.MBeanExporter
| Modifier and Type | Field and Description |
|---|---|
| private ClassLoader | |
| private Properties | interfaceMappings
Mappings of bean keys to an array of classes. |
| private Class | |
| private Map | resolvedInterfaceMappings
Mappings of bean keys to an array of classes. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Implements org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set. |
| protected boolean | Returns: true if the Method is declared in one of the
configured interfaces, otherwise false.the operation method, String Method.the key associated with the MBean in the
beanKey)beans Map.Implements abstract org. Check to see if the |
| protected boolean | Returns: true if the Method is declared in one of the
configured interfaces, otherwise false.the accessor method, String Method.the key associated with the MBean in the
beanKey)beans Map.Implements abstract org. Check to see if the |
| protected boolean | Returns: true if the Method is declared in one of the
configured interfaces, otherwise false.the mutator method, String Method.the key associated with the MBean in the
beanKey)beans Map.Implements abstract org. Check to see if the |
| private boolean | isDeclaredInInterface(Method method, String beanKey)
Checks to see if the given method is declared in a managed interface for the given bean. |
| private boolean | Returns: true if the Method is declared in one of the
configured interfaces and is public, otherwise false.the method, String Method to check.the key associated with the MBean in the beans map beanKey)Check to see if the |
| private Class | Returns: the resolved Classthe class names to resolve classNames, String the bean key that the class names are associated with beanKey)Resolve the given class names into Class objects. |
| private Map | Returns: the resolved interface mappings (with Class objects as values)the specified interface mappings mappings)Resolve the given interface mappings, turning class names into Class objects. |
| public void | setBeanClassLoader(ClassLoader
the owning class loader beanClassLoader)Implements org. Callback that supplies the bean |
| public void | setInterfaceMappings(Properties
the mappings of bean keys to interface names mappings)Set the mappings of bean keys to a comma-separated list of interface names. |
| public void | setManagedInterfaces(Class<?>...
an array of classes indicating the interfaces to use.
Each entry MUST be an interface. managedInterfaces)Set the array of interfaces to use for creating the management info. |
| beanClassLoader | back to summary |
|---|---|
| private ClassLoader beanClassLoader
| |
| interfaceMappings | back to summary |
|---|---|
| private Properties interfaceMappings Mappings of bean keys to an array of classes. | |
| managedInterfaces | back to summary |
|---|---|
| private Class<?>[] managedInterfaces
| |
| resolvedInterfaceMappings | back to summary |
|---|---|
| private Map<String, Class<?>[]> resolvedInterfaceMappings Mappings of bean keys to an array of classes. | |
| InterfaceBasedMBeanInfoAssembler | back to summary |
|---|---|
| public InterfaceBasedMBeanInfoAssembler() | |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() Implements org. Doc from org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
| |
| includeOperation | back to summary |
|---|---|
| protected boolean includeOperation(Method method, String beanKey) Implements abstract org. Check to see if the | |
| includeReadAttribute | back to summary |
|---|---|
| protected boolean includeReadAttribute(Method method, String beanKey) Implements abstract org. Check to see if the | |
| includeWriteAttribute | back to summary |
|---|---|
| protected boolean includeWriteAttribute(Method method, String beanKey) Implements abstract org. Check to see if the | |
| isDeclaredInInterface | back to summary |
|---|---|
| private boolean isDeclaredInInterface(Method method, String beanKey) Checks to see if the given method is declared in a managed interface for the given bean. | |
| isPublicInInterface | back to summary |
|---|---|
| private boolean isPublicInInterface(Method method, String beanKey) Check to see if the | |
| resolveClassNames | back to summary |
|---|---|
| private Class Resolve the given class names into Class objects. | |
| resolveInterfaceMappings | back to summary |
|---|---|
| private Map Resolve the given interface mappings, turning class names into Class objects.
| |
| setBeanClassLoader | back to summary |
|---|---|
| public void setBeanClassLoader(ClassLoader beanClassLoader) Implements org. Doc from org. Callback that supplies the bean Invoked after the population of normal bean properties but
before an initialization callback such as
| |
| setInterfaceMappings | back to summary |
|---|---|
| public void setInterfaceMappings(Properties mappings) Set the mappings of bean keys to a comma-separated list of interface names. The property key should match the bean key and the property value should match the list of interface names. When searching for interfaces for a bean, Spring will check these mappings first.
| |
| setManagedInterfaces | back to summary |
|---|---|
| public void setManagedInterfaces(Class<?>... managedInterfaces) Set the array of interfaces to use for creating the management info.
These interfaces will be used for a bean if no entry corresponding to
that bean is found in the
| |