- java.lang.Object
-
- javax.management.relation.RoleInfo
-
- All Implemented Interfaces:
- Serializable
public class RoleInfo extends Object implements Serializable
A RoleInfo object summarises a role in a relation type.The serialVersionUID of this class is
2504952983494636987L
.- Since:
- 1.5
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static int
ROLE_CARDINALITY_INFINITY
To specify an unlimited cardinality.
-
Constructor Summary
Constructors Constructor and Description RoleInfo(RoleInfo roleInfo)
Copy constructor.RoleInfo(String roleName, String mbeanClassName)
Constructor.RoleInfo(String roleName, String mbeanClassName, boolean read, boolean write)
Constructor.RoleInfo(String roleName, String mbeanClassName, boolean read, boolean write, int min, int max, String descr)
Constructor.
-
Method Summary
Methods Modifier and Type Method and Description boolean
checkMaxDegree(int value)
Returns true if the value parameter is lower than or equal to the expected maximum degree, false otherwise.boolean
checkMinDegree(int value)
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.
-
-
-
Field Detail
-
ROLE_CARDINALITY_INFINITY
public static final int ROLE_CARDINALITY_INFINITY
To specify an unlimited cardinality.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RoleInfo
public RoleInfo(String roleName, String mbeanClassName, boolean read, boolean write, int min, int max, String descr) throws IllegalArgumentException, InvalidRoleInfoException, ClassNotFoundException, NotCompliantMBeanException
Constructor.- Parameters:
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 forisInstanceOf(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)- Throws:
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.
-
RoleInfo
public RoleInfo(String roleName, String mbeanClassName, boolean read, boolean write) throws IllegalArgumentException, ClassNotFoundException, NotCompliantMBeanException
Constructor.- Parameters:
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 forisInstanceOf(M, mbeanClassName)
.read
- flag to indicate if the corresponding role can be readwrite
- flag to indicate if the corresponding role can be setMinimum and maximum degrees defaulted to 1.
Description of role defaulted to null.
- Throws:
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.
-
RoleInfo
public RoleInfo(String roleName, String mbeanClassName) throws IllegalArgumentException, ClassNotFoundException, NotCompliantMBeanException
Constructor.- Parameters:
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 forisInstanceOf(M, mbeanClassName)
.IsReadable and IsWritable defaulted to true.
Minimum and maximum degrees defaulted to 1.
Description of role defaulted to null.
- Throws:
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.
-
RoleInfo
public RoleInfo(RoleInfo roleInfo) throws IllegalArgumentException
Copy constructor.- Parameters:
roleInfo
- the RoleInfo instance to be copied.- Throws:
IllegalArgumentException
- if null parameter
-
-
Method Detail
-
getName
public String getName()
Returns the name of the role.- Returns:
- the name of the role.
-
isReadable
public boolean isReadable()
Returns read access mode for the role (true if it is readable).- Returns:
- true if the role is readable.
-
isWritable
public boolean isWritable()
Returns write access mode for the role (true if it is writable).- Returns:
- true if the role is writable.
-
getDescription
public String getDescription()
Returns description text for the role.- Returns:
- the description of the role.
-
getMinDegree
public int getMinDegree()
Returns minimum degree for corresponding role reference.- Returns:
- the minimum degree.
-
getMaxDegree
public int getMaxDegree()
Returns maximum degree for corresponding role reference.- Returns:
- the maximum degree.
-
getRefMBeanClassName
public String getRefMBeanClassName()
Returns name of type of MBean expected to be referenced in corresponding role.
- Returns:
- the name of the referenced type.
-
checkMinDegree
public boolean checkMinDegree(int value)
Returns true if the value parameter is greater than or equal to the expected minimum degree, false otherwise.- Parameters:
value
- the value to be checked- Returns:
- true if greater than or equal to minimum degree, false otherwise.
-
checkMaxDegree
public boolean checkMaxDegree(int value)
Returns true if the value parameter is lower than or equal to the expected maximum degree, false otherwise.- Parameters:
value
- the value to be checked- Returns:
- true if lower than or equal to maximum degree, false otherwise.
-
-
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 11/06/2005, zuletzt geändert 04/03/2020
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-rf-javax/management/relation/roleinfo.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.