| java.lang.Object org.springframework.jmx.export.assembler.AbstractMBeanInfoAssembler org.springframework.jmx.export.assembler.AbstractReflectiveMBeanInfoAssembler
All known Subclasses: org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler, org.springframework.jmx.export.assembler.AbstractConfigurableMBeanInfoAssembler,
Method Summary | |
protected void | applyCurrencyTimeLimit(Descriptor desc, int currencyTimeLimit) Apply the given JMX "currencyTimeLimit" value to the given descriptor.
Default implementation sets a value >0 as-is (as number of cache seconds),
turns a value of 0 into Integer.MAX_VALUE ("always cache")
and sets the "defaultCurrencyTimeLimit" (if any, indicating "never cache") in case of
a value <0 . | final protected void | applyDefaultCurrencyTimeLimit(Descriptor desc) Set the currencyTimeLimit field to the specified
"defaultCurrencyTimeLimit", if any (by default none). | protected ModelMBeanOperationInfo | createModelMBeanOperationInfo(Method method, String name, String beanKey) Creates an instance of ModelMBeanOperationInfo for the
given method. | protected String | getAttributeDescription(PropertyDescriptor propertyDescriptor, String beanKey) Get the description for a particular attribute. | protected ModelMBeanAttributeInfo[] | getAttributeInfo(Object managedBean, String beanKey) Iterate through all properties on the MBean class and gives subclasses
the chance to vote on the inclusion of both the accessor and mutator. | protected Class | getClassForDescriptor(Object managedBean) Return the class to be used for the JMX descriptor field "class". | protected Integer | getDefaultCurrencyTimeLimit() Return default value for the JMX field "currencyTimeLimit", if any. | protected String | getOperationDescription(Method method, String beanKey) Get the description for a particular operation. | protected ModelMBeanOperationInfo[] | getOperationInfo(Object managedBean, String beanKey) Iterate through all methods on the MBean class and gives subclasses the chance
to vote on their inclusion. | protected MBeanParameterInfo[] | getOperationParameters(Method method, String beanKey) Create parameter info for the given method. | abstract protected boolean | includeOperation(Method method, String beanKey) Allows subclasses to vote on the inclusion of a particular operation. | abstract protected boolean | includeReadAttribute(Method method, String beanKey) Allows subclasses to vote on the inclusion of a particular attribute accessor. | abstract protected boolean | includeWriteAttribute(Method method, String beanKey) Allows subclasses to vote on the inclusion of a particular attribute mutator. | protected boolean | isExposeClassDescriptor() Return whether to expose the JMX descriptor field "class" for managed operations. | protected boolean | isUseStrictCasing() Return whether strict casing for attributes is enabled. | protected void | populateAttributeDescriptor(Descriptor desc, Method getter, Method setter, String beanKey) Allows subclasses to add extra fields to the Descriptor for a particular
attribute. | protected void | populateMBeanDescriptor(Descriptor descriptor, Object managedBean, String beanKey) Allows subclasses to add extra fields to the Descriptor for an
MBean. | protected void | populateOperationDescriptor(Descriptor desc, Method method, String beanKey) Allows subclasses to add extra fields to the Descriptor for a particular
operation. | public void | setDefaultCurrencyTimeLimit(Integer defaultCurrencyTimeLimit) Set the default for the JMX field "currencyTimeLimit".
The default will usually indicate to never cache attribute values.
Default is none, not explicitly setting that field, as recommended by the
JMX 1.2 specification. | public void | setExposeClassDescriptor(boolean exposeClassDescriptor) Set whether to expose the JMX descriptor field "class" for managed operations.
Default is "false", letting the JMX implementation determine the actual class
through reflection.
Set this property to true for JMX implementations that
require the "class" field to be specified, for example WebLogic's.
In that case, Spring will expose the target class name there, in case of
a plain bean instance or a CGLIB proxy. | public void | setUseStrictCasing(boolean useStrictCasing) Set whether to use strict casing for attributes. |
FIELD_CLASS | final protected static String FIELD_CLASS(Code) | | Constant identifier for the class field in a JMX
Descriptor .
|
FIELD_CURRENCY_TIME_LIMIT | final protected static String FIELD_CURRENCY_TIME_LIMIT(Code) | | Constant identifier for the currency time limit field in a JMX
Descriptor .
|
FIELD_DEFAULT | final protected static String FIELD_DEFAULT(Code) | | Constant identifier for the default field in a JMX
Descriptor .
|
FIELD_GET_METHOD | final protected static String FIELD_GET_METHOD(Code) | | Identifies a getter method in a JMX
Descriptor .
|
FIELD_LOG | final protected static String FIELD_LOG(Code) | | Constant identifier for the log field in a JMX
Descriptor .
|
FIELD_LOG_FILE | final protected static String FIELD_LOG_FILE(Code) | | Constant identifier for the logfile field in a JMX
Descriptor .
|
FIELD_PERSIST_LOCATION | final protected static String FIELD_PERSIST_LOCATION(Code) | | Constant identifier for the persistLocation field in a JMX
Descriptor .
|
FIELD_PERSIST_NAME | final protected static String FIELD_PERSIST_NAME(Code) | | Constant identifier for the persistName field in a JMX
Descriptor .
|
FIELD_PERSIST_PERIOD | final protected static String FIELD_PERSIST_PERIOD(Code) | | Constant identifier for the persistPeriod field in a JMX
Descriptor .
|
FIELD_PERSIST_POLICY | final protected static String FIELD_PERSIST_POLICY(Code) | | Constant identifier for the persistPolicy field in a JMX
Descriptor .
|
FIELD_ROLE | final protected static String FIELD_ROLE(Code) | | Constant identifier for the role field in a JMX
Descriptor .
|
FIELD_SET_METHOD | final protected static String FIELD_SET_METHOD(Code) | | Identifies a setter method in a JMX
Descriptor .
|
FIELD_VISIBILITY | final protected static String FIELD_VISIBILITY(Code) | | Constant identifier for the visibility field in a JMX
Descriptor .
|
ROLE_GETTER | final protected static String ROLE_GETTER(Code) | | Constant identifier for the getter role field value in a JMX
Descriptor .
|
ROLE_OPERATION | final protected static String ROLE_OPERATION(Code) | | Identifies an operation (method) in a JMX
Descriptor .
|
ROLE_SETTER | final protected static String ROLE_SETTER(Code) | | Constant identifier for the setter role field value in a JMX
Descriptor .
|
createModelMBeanOperationInfo | protected ModelMBeanOperationInfo createModelMBeanOperationInfo(Method method, String name, String beanKey)(Code) | | Creates an instance of ModelMBeanOperationInfo for the
given method. Populates the parameter info for the operation.
Parameters: method - the Method to create a ModelMBeanOperationInfo for Parameters: name - the name for the operation info Parameters: beanKey - the key associated with the MBean in the beans mapof the MBeanExporter the ModelMBeanOperationInfo |
getAttributeDescription | protected String getAttributeDescription(PropertyDescriptor propertyDescriptor, String beanKey)(Code) | | Get the description for a particular attribute.
Default implementation returns a description for the operation
that is the name of corresponding Method .
Parameters: propertyDescriptor - the PropertyDescriptor for the attribute Parameters: beanKey - the key associated with the MBean in the beans mapof the MBeanExporter the description for the attribute |
getAttributeInfo | protected ModelMBeanAttributeInfo[] getAttributeInfo(Object managedBean, String beanKey) throws JMException(Code) | | Iterate through all properties on the MBean class and gives subclasses
the chance to vote on the inclusion of both the accessor and mutator.
If a particular accessor or mutator is voted for inclusion, the appropriate
metadata is assembled and passed to the subclass for descriptor population.
Parameters: managedBean - the bean instance (might be an AOP proxy) Parameters: beanKey - the key associated with the MBean in the beans mapof the MBeanExporter the attribute metadata throws: JMException - in case of errors See Also: AbstractReflectiveMBeanInfoAssembler.populateAttributeDescriptor |
getDefaultCurrencyTimeLimit | protected Integer getDefaultCurrencyTimeLimit()(Code) | | Return default value for the JMX field "currencyTimeLimit", if any.
|
getOperationDescription | protected String getOperationDescription(Method method, String beanKey)(Code) | | Get the description for a particular operation.
Default implementation returns a description for the operation
that is the name of corresponding Method .
Parameters: method - the operation method Parameters: beanKey - the key associated with the MBean in the beans mapof the MBeanExporter the description for the operation |
getOperationInfo | protected ModelMBeanOperationInfo[] getOperationInfo(Object managedBean, String beanKey)(Code) | | Iterate through all methods on the MBean class and gives subclasses the chance
to vote on their inclusion. If a particular method corresponds to the accessor
or mutator of an attribute that is inclued in the managment interface, then
the corresponding operation is exposed with the "role" descriptor
field set to the appropriate value.
Parameters: managedBean - the bean instance (might be an AOP proxy) Parameters: beanKey - the key associated with the MBean in the beans mapof the MBeanExporter the operation metadata See Also: AbstractReflectiveMBeanInfoAssembler.populateOperationDescriptor |
getOperationParameters | protected MBeanParameterInfo[] getOperationParameters(Method method, String beanKey)(Code) | | Create parameter info for the given method. Default implementation
returns an empty arry of MBeanParameterInfo .
Parameters: method - the Method to get the parameter information for Parameters: beanKey - the key associated with the MBean in the beans mapof the MBeanExporter the MBeanParameterInfo array |
includeOperation | abstract protected boolean includeOperation(Method method, String beanKey)(Code) | | Allows subclasses to vote on the inclusion of a particular operation.
Parameters: method - the operation method Parameters: beanKey - the key associated with the MBean in the beans mapof the MBeanExporter whether the operation should be included in the management interface |
includeReadAttribute | abstract protected boolean includeReadAttribute(Method method, String beanKey)(Code) | | Allows subclasses to vote on the inclusion of a particular attribute accessor.
Parameters: method - the accessor Method Parameters: beanKey - the key associated with the MBean in the beans mapof the MBeanExporter true if the accessor should be included in the management interface,otherwise false
|
includeWriteAttribute | abstract protected boolean includeWriteAttribute(Method method, String beanKey)(Code) | | Allows subclasses to vote on the inclusion of a particular attribute mutator.
Parameters: method - the mutator Method . Parameters: beanKey - the key associated with the MBean in the beans mapof the MBeanExporter true if the mutator should be included in the management interface,otherwise false
|
isExposeClassDescriptor | protected boolean isExposeClassDescriptor()(Code) | | Return whether to expose the JMX descriptor field "class" for managed operations.
|
isUseStrictCasing | protected boolean isUseStrictCasing()(Code) | | Return whether strict casing for attributes is enabled.
|
setDefaultCurrencyTimeLimit | public void setDefaultCurrencyTimeLimit(Integer defaultCurrencyTimeLimit)(Code) | | Set the default for the JMX field "currencyTimeLimit".
The default will usually indicate to never cache attribute values.
Default is none, not explicitly setting that field, as recommended by the
JMX 1.2 specification. This should result in "never cache" behavior, always
reading attribute values freshly (which corresponds to a "currencyTimeLimit"
of -1 in JMX 1.2).
However, some JMX implementations (that do not follow the JMX 1.2 spec
in that respect) might require an explicit value to be set here to get
"never cache" behavior: for example, JBoss 3.2.x.
Note that the "currencyTimeLimit" value can also be specified on a
managed attribute or operation. The default value will apply if not
overridden with a "currencyTimeLimit" value >= 0 there:
a metadata "currencyTimeLimit" value of -1 indicates
to use the default; a value of 0 indicates to "always cache"
and will be translated to Integer.MAX_VALUE ; a positive
value indicates the number of cache seconds.
See Also: org.springframework.jmx.export.metadata.AbstractJmxAttribute.setCurrencyTimeLimit See Also: AbstractReflectiveMBeanInfoAssembler.applyCurrencyTimeLimit(javax.management.Descriptor,int) |
setExposeClassDescriptor | public void setExposeClassDescriptor(boolean exposeClassDescriptor)(Code) | | Set whether to expose the JMX descriptor field "class" for managed operations.
Default is "false", letting the JMX implementation determine the actual class
through reflection.
Set this property to true for JMX implementations that
require the "class" field to be specified, for example WebLogic's.
In that case, Spring will expose the target class name there, in case of
a plain bean instance or a CGLIB proxy. When encountering a JDK dynamic
proxy, the first interface implemented by the proxy will be specified.
WARNING: Review your proxy definitions when exposing a JDK dynamic
proxy through JMX, in particular with this property turned to true :
the specified interface list should start with your management interface in
this case, with all other interfaces following. In general, consider exposing
your target bean directly or a CGLIB proxy for it instead.
See Also: AbstractReflectiveMBeanInfoAssembler.getClassForDescriptor(Object) |
setUseStrictCasing | public void setUseStrictCasing(boolean useStrictCasing)(Code) | | Set whether to use strict casing for attributes. Enabled by default.
When using strict casing, a JavaBean property with a getter such as
getFoo() translates to an attribute called Foo .
With strict casing disabled, getFoo() would translate to just
foo .
|
|
|