public interface DynamicMBean
| Modifier and Type | Method and Description |
|---|---|
Object |
getAttribute(String attribute)
获取动态MBean的特定属性的值。
|
AttributeList |
getAttributes(String[] attributes)
获取动态MBean的几个属性的值。
|
MBeanInfo |
getMBeanInfo()
使用MBeanInfo对象提供动态MBean的公开属性和动作。
|
Object |
invoke(String actionName, Object[] params, String[] signature)
允许在动态MBean上调用操作。
|
void |
setAttribute(Attribute attribute)
设置动态MBean的特定属性的值。
|
AttributeList |
setAttributes(AttributeList attributes)
设置动态MBean的几个属性的值。
|
Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException
attribute - 要检索的属性的名称
AttributeNotFoundException
MBeanException - 包裹MBean的吸气
java.lang.Exception抛出的
java.lang.Exception 。
ReflectionException - 包装
java.lang.Exception在尝试调用getter时抛出。
setAttribute(javax.management.Attribute)
void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
attribute - 要设置的属性的标识和要设置的值。
AttributeNotFoundException
InvalidAttributeValueException
MBeanException - 包装MBean的设定者抛出的
java.lang.Exception 。
ReflectionException - 在尝试调用MBean的设置器时抛出一个
java.lang.Exception 。
getAttribute(java.lang.String)
AttributeList getAttributes(String[] attributes)
attributes - 要检索的属性的列表。
setAttributes(javax.management.AttributeList)
AttributeList setAttributes(AttributeList attributes)
attributes - 属性列表:要设置的属性的标识以及要设置的属性值。
getAttributes(java.lang.String[])
Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException
actionName - 要调用的动作的名称。
params - 包含调用操作时要设置的参数的数组。
signature - 包含动作签名的数组。
类对象将通过与用于加载调用操作的MBean相同的类加载器来加载。
MBeanException - 包装由MBean调用的方法抛出的
java.lang.Exception 。
ReflectionException - 在尝试调用该方法时抛出一个
java.lang.Exception
MBeanInfo getMBeanInfo()
MBeanInfo一个实例允许检索此动态MBean公开的所有属性和操作。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.