public class RoleInfo extends Object implements Serializable
这个班的serialVersionUID是2504952983494636987L。
| Modifier and Type | Field and Description |
|---|---|
static int |
ROLE_CARDINALITY_INFINITY
指定一个无限的基数。
|
| Constructor and Description |
|---|
RoleInfo(RoleInfo roleInfo)
复制构造函数。
|
RoleInfo(String roleName, String mbeanClassName)
构造函数。
|
RoleInfo(String roleName, String mbeanClassName, boolean read, boolean write)
构造函数。
|
RoleInfo(String roleName, String mbeanClassName, boolean read, boolean write, int min, int max, String descr)
构造函数。
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkMaxDegree(int value)
如果
value参数小于或等于预期的最大程度,返回true,否则为false。
|
boolean |
checkMinDegree(int value)
如果
value参数大于或等于预期的最低程度,返回true,否则为false。
|
String |
getDescription()
返回角色的描述文本。
|
int |
getMaxDegree()
返回最大程度为相应的角色参考。
|
int |
getMinDegree()
返回对应的角色参考的最小度。
|
String |
getName()
返回角色的名称。
|
String |
getRefMBeanClassName()
对MBean将引用的类型返回相应的角色名称。
|
boolean |
isReadable()
返回读取角色的访问模式(如果它是可读的)。
|
boolean |
isWritable()
返回写访问模式的作用(如果它是可写的)。
|
String |
toString()
返回描述角色信息的字符串。
|
public static final int ROLE_CARDINALITY_INFINITY
public RoleInfo(String roleName, String mbeanClassName, boolean read, boolean write, int min, int max, String descr) throws IllegalArgumentException, InvalidRoleInfoException, ClassNotFoundException, NotCompliantMBeanException
roleName -角色名称。
mbeanClassName - MBean的类名称(S)预计将在相应的角色参考。如果一个MBean M是这个角色,那么MBean服务器必须返回true
isInstanceOf(M, mbeanClassName)。
read国旗表明如果对应的角色可以读
write国旗表明如果对应的角色可以设置
min -作用最小程度,即最少的MBean提供相应的角色必须小于或等于
max。(role_cardinality_infinity无限)
max -作用最大程度,即最大数量的MBean提供相应的角色必须大于或等于
min(role_cardinality_infinity无限)
descr -角色的描述(可以为空)
IllegalArgumentException如果空参数
InvalidRoleInfoException -如果最低程度大于最大程度。
ClassNotFoundException作为JMX 1.2,这个例外不能丢。它保留在这个类的声明中,以与现有代码的兼容性。
NotCompliantMBeanException -如果类mbeanclassname不是MBean类。
public RoleInfo(String roleName, String mbeanClassName, boolean read, boolean write) throws IllegalArgumentException, ClassNotFoundException, NotCompliantMBeanException
roleName -角色名称
mbeanClassName - MBean的类名称(S)预计将在相应的角色参考。如果一个MBean M是这个角色,那么MBean服务器必须返回true
isInstanceOf(M, mbeanClassName)。
read国旗表明如果对应的角色可以读
write国旗表明如果对应的角色可以设置
最小和最大程度的默认为1。
角色默认为空的描述。
IllegalArgumentException如果空参数
ClassNotFoundException作为JMX 1.2,这个例外不能丢。它保留在这个类的声明中,以与现有代码的兼容性。
NotCompliantMBeanException作为JMX 1.2,这个例外不能丢。它保留在这个类的声明中,以与现有代码的兼容性。
public RoleInfo(String roleName, String mbeanClassName) throws IllegalArgumentException, ClassNotFoundException, NotCompliantMBeanException
roleName -角色名称
mbeanClassName - MBean的类名称(S)预计将在相应的角色参考。如果一个MBean M是这个角色,那么MBean服务器必须返回true
isInstanceOf(M, mbeanClassName)
isreadable和iswritable默认为真。
最小和最大程度的默认为1。
角色默认为空的描述。
。IllegalArgumentException如果空参数
ClassNotFoundException作为JMX 1.2,这个例外不能丢。它保留在这个类的声明中,以与现有代码的兼容性。
NotCompliantMBeanException作为JMX 1.2,这个例外不能丢。它保留在这个类的声明中,以与现有代码的兼容性。
public RoleInfo(RoleInfo roleInfo) throws IllegalArgumentException
roleInfo -可以复制
RoleInfo实例。
IllegalArgumentException如果空参数
public String getName()
public boolean isReadable()
public boolean isWritable()
public String getDescription()
public int getMinDegree()
public int getMaxDegree()
public String getRefMBeanClassName()
对MBean将引用的类型返回相应的角色名称。
public boolean checkMinDegree(int value)
value -进行检查的价值
public boolean checkMaxDegree(int value)
value -进行检查的价值
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.