Serializable
public class RoleInfo extends Object implements Serializable
The serialVersionUID of this class is 2504952983494636987L
.
Modifier and Type | Field | Description |
---|---|---|
static final int |
ROLE_CARDINALITY_INFINITY |
To specify an unlimited cardinality. |
Constructor | Description |
---|---|
RoleInfo |
Constructor. |
RoleInfo |
Constructor. |
RoleInfo |
Constructor. |
RoleInfo |
Copy constructor. |
Modifier and Type | Method | Description |
---|---|---|
boolean |
checkMaxDegree |
Returns true if the value parameter is lower than or equal to the expected maximum degree, false otherwise. |
boolean |
checkMinDegree |
Returns true if the value parameter is greater than or equal to the expected minimum degree, false otherwise. |
String |
getDescription() |
Returns description text for the role. |
int |
getMaxDegree() |
Returns maximum degree for corresponding role reference. |
int |
getMinDegree() |
Returns minimum degree for corresponding role reference. |
String |
getName() |
Returns the name of the role. |
String |
getRefMBeanClassName() |
Returns name of type of MBean expected to be referenced in corresponding role. |
boolean |
isReadable() |
Returns read access mode for the role (true if it is readable). |
boolean |
isWritable() |
Returns write access mode for the role (true if it is writable). |
String |
toString() |
Returns a string describing the role info. |
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
- name of the role.mbeanClassName
- name of the class of MBean(s) expected to be referenced in corresponding role. If an MBean M is in this role, then the MBean server must return true for isInstanceOf(M, mbeanClassName)
.read
- flag to indicate if the corresponding role can be readwrite
- flag to indicate if the corresponding role can be setmin
- minimum degree for role, i.e. minimum number of MBeans to provide in corresponding role Must be less than or equal to max
. (ROLE_CARDINALITY_INFINITY for unlimited)max
- maximum degree for role, i.e. maximum number of MBeans to provide in corresponding role Must be greater than or equal to min
(ROLE_CARDINALITY_INFINITY for unlimited)descr
- description of the role (can be null)IllegalArgumentException
- if null parameterInvalidRoleInfoException
- if the minimum degree is greater than the maximum degree.ClassNotFoundException
- As of JMX 1.2, this exception can no longer be thrown. It is retained in the declaration of this class for compatibility with existing code.NotCompliantMBeanException
- if the class mbeanClassName is not a MBean class.public RoleInfo(String roleName, String mbeanClassName, boolean read, boolean write) throws IllegalArgumentException, ClassNotFoundException, NotCompliantMBeanException
roleName
- name of the rolembeanClassName
- name of the class of MBean(s) expected to be referenced in corresponding role. If an MBean M is in this role, then the MBean server must return true for isInstanceOf(M, mbeanClassName)
.read
- flag to indicate if the corresponding role can be readwrite
- flag to indicate if the corresponding role can be set Minimum and maximum degrees defaulted to 1.
Description of role defaulted to null.
IllegalArgumentException
- if null parameterClassNotFoundException
- As of JMX 1.2, this exception can no longer be thrown. It is retained in the declaration of this class for compatibility with existing code.NotCompliantMBeanException
- As of JMX 1.2, this exception can no longer be thrown. It is retained in the declaration of this class for compatibility with existing code.public RoleInfo(String roleName, String mbeanClassName) throws IllegalArgumentException, ClassNotFoundException, NotCompliantMBeanException
roleName
- name of the rolembeanClassName
- name of the class of MBean(s) expected to be referenced in corresponding role. If an MBean M is in this role, then the MBean server must return true for isInstanceOf(M, mbeanClassName)
. IsReadable and IsWritable defaulted to true.
Minimum and maximum degrees defaulted to 1.
Description of role defaulted to null.
IllegalArgumentException
- if null parameterClassNotFoundException
- As of JMX 1.2, this exception can no longer be thrown. It is retained in the declaration of this class for compatibility with existing code.NotCompliantMBeanException
- As of JMX 1.2, this exception can no longer be thrown. It is retained in the declaration of this class for compatibility with existing code.public RoleInfo(RoleInfo roleInfo) throws IllegalArgumentException
roleInfo
- the RoleInfo
instance to be copied.IllegalArgumentException
- if null parameterpublic String getName()
public boolean isReadable()
public boolean isWritable()
public String getDescription()
public int getMinDegree()
public int getMaxDegree()
public String getRefMBeanClassName()
Returns name of type of MBean expected to be referenced in corresponding role.
public boolean checkMinDegree(int value)
value
parameter is greater than or equal to the expected minimum degree, false otherwise.value
- the value to be checkedpublic boolean checkMaxDegree(int value)
value
parameter is lower than or equal to the expected maximum degree, false otherwise.value
- the value to be checkedpublic String toString()
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.management/javax/management/relation/RoleInfo.html