javax.management.relation
Class RoleInfo

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.management.relation.RoleInfo
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable

public class RoleInfo
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements Serializable sample code for java.io.Serializable definition code for java.io.Serializable

A RoleInfo object summarises a role in a relation type.

Since:
1.5
See Also:
Serialized Form

Field Summary
static int ROLE_CARDINALITY_INFINITY sample code for javax.management.relation.RoleInfo.ROLE_CARDINALITY_INFINITY definition code for javax.management.relation.RoleInfo.ROLE_CARDINALITY_INFINITY
          To specify an unlimited cardinality.
 
Constructor Summary
RoleInfo sample code for javax.management.relation.RoleInfo.RoleInfo(javax.management.relation.RoleInfo) definition code for javax.management.relation.RoleInfo.RoleInfo(javax.management.relation.RoleInfo) (RoleInfo sample code for javax.management.relation.RoleInfo definition code for javax.management.relation.RoleInfo  theRoleInfo)
          Copy constructor.
RoleInfo sample code for javax.management.relation.RoleInfo.RoleInfo(java.lang.String, java.lang.String) definition code for javax.management.relation.RoleInfo.RoleInfo(java.lang.String, java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  theName, String sample code for java.lang.String definition code for java.lang.String  theRefMBeanClassName)
          Constructor.
RoleInfo sample code for javax.management.relation.RoleInfo.RoleInfo(java.lang.String, java.lang.String, boolean, boolean) definition code for javax.management.relation.RoleInfo.RoleInfo(java.lang.String, java.lang.String, boolean, boolean) (String sample code for java.lang.String definition code for java.lang.String  theName, String sample code for java.lang.String definition code for java.lang.String  theRefMBeanClassName, boolean theIsReadable, boolean theIsWritable)
          Constructor.
RoleInfo sample code for javax.management.relation.RoleInfo.RoleInfo(java.lang.String, java.lang.String, boolean, boolean, int, int, java.lang.String) definition code for javax.management.relation.RoleInfo.RoleInfo(java.lang.String, java.lang.String, boolean, boolean, int, int, java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  theName, String sample code for java.lang.String definition code for java.lang.String  theRefMBeanClassName, boolean theIsReadable, boolean theIsWritable, int theMinDegree, int theMaxDegree, String sample code for java.lang.String definition code for java.lang.String  theDescription)
          Constructor.
 
Method Summary
 boolean checkMaxDegree sample code for javax.management.relation.RoleInfo.checkMaxDegree(int) definition code for javax.management.relation.RoleInfo.checkMaxDegree(int) (int theValue)
          Returns a boolean to specify if given value is less or equal than expected maximum degree (true if yes).
 boolean checkMinDegree sample code for javax.management.relation.RoleInfo.checkMinDegree(int) definition code for javax.management.relation.RoleInfo.checkMinDegree(int) (int theValue)
          Returns a boolean to specify if given value is greater or equal than expected minimum degree (true if yes).
 String sample code for java.lang.String definition code for java.lang.String getDescription sample code for javax.management.relation.RoleInfo.getDescription() definition code for javax.management.relation.RoleInfo.getDescription() ()
          Returns description text for the role.
 int getMaxDegree sample code for javax.management.relation.RoleInfo.getMaxDegree() definition code for javax.management.relation.RoleInfo.getMaxDegree() ()
          Returns maximum degree for corresponding role reference.
 int getMinDegree sample code for javax.management.relation.RoleInfo.getMinDegree() definition code for javax.management.relation.RoleInfo.getMinDegree() ()
          Returns minimum degree for corresponding role reference.
 String sample code for java.lang.String definition code for java.lang.String getName sample code for javax.management.relation.RoleInfo.getName() definition code for javax.management.relation.RoleInfo.getName() ()
          Returns the name of the role.
 String sample code for java.lang.String definition code for java.lang.String getRefMBeanClassName sample code for javax.management.relation.RoleInfo.getRefMBeanClassName() definition code for javax.management.relation.RoleInfo.getRefMBeanClassName() ()
          Returns name of type of MBean expected to be referenced in corresponding role.
 boolean isReadable sample code for javax.management.relation.RoleInfo.isReadable() definition code for javax.management.relation.RoleInfo.isReadable() ()
          Returns read access mode for the role (true if it is readable).
 boolean isWritable sample code for javax.management.relation.RoleInfo.isWritable() definition code for javax.management.relation.RoleInfo.isWritable() ()
          Returns write access mode for the role (true if it is writable).
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.management.relation.RoleInfo.toString() definition code for javax.management.relation.RoleInfo.toString() ()
          Returns a string describing the role info.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

ROLE_CARDINALITY_INFINITY sample code for javax.management.relation.RoleInfo.ROLE_CARDINALITY_INFINITY

public static int ROLE_CARDINALITY_INFINITY
To specify an unlimited cardinality.

Constructor Detail

RoleInfo sample code for javax.management.relation.RoleInfo(java.lang.String, java.lang.String, boolean, boolean, int, int, java.lang.String) definition code for javax.management.relation.RoleInfo(java.lang.String, java.lang.String, boolean, boolean, int, int, java.lang.String)

public RoleInfo(String sample code for java.lang.String definition code for java.lang.String  theName,
                String sample code for java.lang.String definition code for java.lang.String  theRefMBeanClassName,
                boolean theIsReadable,
                boolean theIsWritable,
                int theMinDegree,
                int theMaxDegree,
                String sample code for java.lang.String definition code for java.lang.String  theDescription)
         throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                InvalidRoleInfoException sample code for javax.management.relation.InvalidRoleInfoException definition code for javax.management.relation.InvalidRoleInfoException ,
                ClassNotFoundException sample code for java.lang.ClassNotFoundException definition code for java.lang.ClassNotFoundException ,
                NotCompliantMBeanException sample code for javax.management.NotCompliantMBeanException definition code for javax.management.NotCompliantMBeanException 
Constructor.

Parameters:
theName - name of the role.
theRefMBeanClassName - 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, theRefMBeanClassName) sample code for javax.management.MBeanServer.isInstanceOf(javax.management.ObjectName, java.lang.String) definition code for javax.management.MBeanServer.isInstanceOf(javax.management.ObjectName, java.lang.String) .
theIsReadable - flag to indicate if the corresponding role can be read
theIsWritable - flag to indicate if the corresponding role can be set
theMinDegree - minimum degree for role, i.e. minimum number of MBeans to provide in corresponding role Must be less or equal than theMaxDegree. (ROLE_CARDINALITY_INFINITY for unlimited)
theMaxDegree - maximum degree for role, i.e. maximum number of MBeans to provide in corresponding role Must be greater or equal than theMinDegree (ROLE_CARDINALITY_INFINITY for unlimited)
theDescription - description of the role (can be null)
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
InvalidRoleInfoException sample code for javax.management.relation.InvalidRoleInfoException definition code for javax.management.relation.InvalidRoleInfoException - if the minimum degree is greater than the maximum degree.
ClassNotFoundException sample code for java.lang.ClassNotFoundException definition code for java.lang.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 sample code for javax.management.NotCompliantMBeanException definition code for javax.management.NotCompliantMBeanException - if the class theRefMBeanClassName is not a MBean class.

RoleInfo sample code for javax.management.relation.RoleInfo(java.lang.String, java.lang.String, boolean, boolean) definition code for javax.management.relation.RoleInfo(java.lang.String, java.lang.String, boolean, boolean)

public RoleInfo(String sample code for java.lang.String definition code for java.lang.String  theName,
                String sample code for java.lang.String definition code for java.lang.String  theRefMBeanClassName,
                boolean theIsReadable,
                boolean theIsWritable)
         throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                ClassNotFoundException sample code for java.lang.ClassNotFoundException definition code for java.lang.ClassNotFoundException ,
                NotCompliantMBeanException sample code for javax.management.NotCompliantMBeanException definition code for javax.management.NotCompliantMBeanException 
Constructor.

Parameters:
theName - name of the role
theRefMBeanClassName - 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, theRefMBeanClassName) sample code for javax.management.MBeanServer.isInstanceOf(javax.management.ObjectName, java.lang.String) definition code for javax.management.MBeanServer.isInstanceOf(javax.management.ObjectName, java.lang.String) .
theIsReadable - flag to indicate if the corresponding role can be read
theIsWritable - 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 sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
ClassNotFoundException sample code for java.lang.ClassNotFoundException definition code for java.lang.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 sample code for javax.management.NotCompliantMBeanException definition code for javax.management.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 sample code for javax.management.relation.RoleInfo(java.lang.String, java.lang.String) definition code for javax.management.relation.RoleInfo(java.lang.String, java.lang.String)

public RoleInfo(String sample code for java.lang.String definition code for java.lang.String  theName,
                String sample code for java.lang.String definition code for java.lang.String  theRefMBeanClassName)
         throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                ClassNotFoundException sample code for java.lang.ClassNotFoundException definition code for java.lang.ClassNotFoundException ,
                NotCompliantMBeanException sample code for javax.management.NotCompliantMBeanException definition code for javax.management.NotCompliantMBeanException 
Constructor.

Parameters:
theName - name of the role
theRefMBeanClassName - 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, theRefMBeanClassName) sample code for javax.management.MBeanServer.isInstanceOf(javax.management.ObjectName, java.lang.String) definition code for javax.management.MBeanServer.isInstanceOf(javax.management.ObjectName, java.lang.String) .

IsReadable and IsWritable defaulted to true.

Minimum and maximum degrees defaulted to 1.

Description of role defaulted to null.

Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
ClassNotFoundException sample code for java.lang.ClassNotFoundException definition code for java.lang.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 sample code for javax.management.NotCompliantMBeanException definition code for javax.management.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 sample code for javax.management.relation.RoleInfo(javax.management.relation.RoleInfo) definition code for javax.management.relation.RoleInfo(javax.management.relation.RoleInfo)

public RoleInfo(RoleInfo sample code for javax.management.relation.RoleInfo definition code for javax.management.relation.RoleInfo  theRoleInfo)
         throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException 
Copy constructor.

Parameters:
theRoleInfo - the RoleInfo to be copied.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
Method Detail

getName sample code for javax.management.relation.RoleInfo.getName() definition code for javax.management.relation.RoleInfo.getName()

public String sample code for java.lang.String definition code for java.lang.String  getName()
Returns the name of the role.

Returns:
the name of the role.

isReadable sample code for javax.management.relation.RoleInfo.isReadable() definition code for javax.management.relation.RoleInfo.isReadable()

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

Returns:
true if the role is readable.

isWritable sample code for javax.management.relation.RoleInfo.isWritable() definition code for javax.management.relation.RoleInfo.isWritable()

public boolean isWritable()
Returns write access mode for the role (true if it is writable).

Returns:
true if the role is writable.

getDescription sample code for javax.management.relation.RoleInfo.getDescription() definition code for javax.management.relation.RoleInfo.getDescription()

public String sample code for java.lang.String definition code for java.lang.String  getDescription()
Returns description text for the role.

Returns:
the description of the role.

getMinDegree sample code for javax.management.relation.RoleInfo.getMinDegree() definition code for javax.management.relation.RoleInfo.getMinDegree()

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

Returns:
the minimum degree.

getMaxDegree sample code for javax.management.relation.RoleInfo.getMaxDegree() definition code for javax.management.relation.RoleInfo.getMaxDegree()

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

Returns:
the maximum degree.

getRefMBeanClassName sample code for javax.management.relation.RoleInfo.getRefMBeanClassName() definition code for javax.management.relation.RoleInfo.getRefMBeanClassName()

public String sample code for java.lang.String definition code for java.lang.String  getRefMBeanClassName()

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

Returns:
the name of the referenced type.

checkMinDegree sample code for javax.management.relation.RoleInfo.checkMinDegree(int) definition code for javax.management.relation.RoleInfo.checkMinDegree(int)

public boolean checkMinDegree(int theValue)
Returns a boolean to specify if given value is greater or equal than expected minimum degree (true if yes).

Parameters:
theValue - value
Returns:
true if greater or equal than minimum degree, false otherwise.

checkMaxDegree sample code for javax.management.relation.RoleInfo.checkMaxDegree(int) definition code for javax.management.relation.RoleInfo.checkMaxDegree(int)

public boolean checkMaxDegree(int theValue)
Returns a boolean to specify if given value is less or equal than expected maximum degree (true if yes).

Parameters:
theValue - value
Returns:
true if less or equal than maximum degree, false otherwise.

toString sample code for javax.management.relation.RoleInfo.toString() definition code for javax.management.relation.RoleInfo.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
Returns a string describing the role info.

Overrides:
toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
a description of the role info.