This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.management.relation
class RoleInfo

java.lang.Object extended by javax.management.relation.RoleInfo
All Implemented Interfaces:
Serializable

Most common way to construct:

HashMap infos = …;
String roleName = …;

RoleInfo info = (RoleInfo)infos.get(roleName);

Based on 9 examples


public class RoleInfo
extends Object
implements Serializable

A RoleInfo object summarises a role in a relation type.

The serialVersionUID of this class is 2504952983494636987L.


Field Summary
static int ROLE_CARDINALITY_INFINITY
          To specify an unlimited cardinality.
 
Constructor Summary
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
 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

          Returns description text for the role.
 int

          Returns maximum degree for corresponding role reference.
 int

          Returns minimum degree for corresponding role reference.
 String

          Returns the name of the role.
 String

          Returns name of type of MBean expected to be referenced in corresponding role.
 boolean

          Returns read access mode for the role (true if it is readable).
 boolean

          Returns write access mode for the role (true if it is writable).
 String

          Returns a string describing the role info.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROLE_CARDINALITY_INFINITY

public static final int ROLE_CARDINALITY_INFINITY
To specify an unlimited cardinality.
Constructor Detail

RoleInfo

public RoleInfo(RoleInfo roleInfo)
         throws IllegalArgumentException
Copy constructor.

Parameters:
roleInfo - the RoleInfo instance to be copied.
Throws:
IllegalArgumentException - if null parameter

RoleInfo

public RoleInfo(String roleName,
                String mbeanClassName)
         throws IllegalArgumentException,
                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 for {@link MBeanServer#isInstanceOf isInstanceOf(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 parameter
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 - 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,
                boolean read,
                boolean write)
         throws IllegalArgumentException,
                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 for {@link MBeanServer#isInstanceOf isInstanceOf(M, mbeanClassName)}.
read - flag to indicate if the corresponding role can be read
write - flag to indicate if the corresponding role can be set

Minimum and maximum degrees defaulted to 1.

Description of role defaulted to null.

Throws:
IllegalArgumentException - if null parameter
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 - 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,
                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 for {@link MBeanServer#isInstanceOf isInstanceOf(M, mbeanClassName)}.
read - flag to indicate if the corresponding role can be read
write - flag to indicate if the corresponding role can be set
min - 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 parameter
InvalidRoleInfoException - 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.
Method Detail

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.

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.

getDescription

public String getDescription()
Returns description text for the role.

Returns:
the description of the role.

getMaxDegree

public int getMaxDegree()
Returns maximum degree for corresponding role reference.

Returns:
the maximum degree.

getMinDegree

public int getMinDegree()
Returns minimum degree for corresponding role reference.

Returns:
the minimum degree.

getName

public String getName()
Returns the name of the role.

Returns:
the name of the role.

getRefMBeanClassName

public String getRefMBeanClassName()

Returns name of type of MBean expected to be referenced in corresponding role.

Returns:
the name of the referenced type.

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.

toString

public String toString()
Returns a string describing the role info.

Overrides:
toString in class Object
Returns:
a description of the role info.


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.