站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 jmx API Documentation 英文版文档

RoleInfo (JBoss/JMX API) - JBoss 4.0.1 sp1 jmx API Documentation 英文版文档


javax.management.relation
Class RoleInfo

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

public class RoleInfo
extends Object
implements Serializable

This class contains information about a role. For example the number of mbean class name of the role, how many mbeans are part of the role, whether the role is read/write, etc.

Version:
$Revision: 1.11 $
Author:
Adrian Brock., Thomas Diesler.
See Also:
Serialized Form

Field Summary
static int ROLE_CARDINALITY_INFINITY
          A value used to specify an infinite number of mbeans are allowed in the role
 
Constructor Summary
RoleInfo(RoleInfo other)
          Copies the role info.
RoleInfo(String name, String className)
          Construct a role info with the given name and class name.
RoleInfo(String name, String className, boolean readable, boolean writable)
          Construct a role info with the given name, class name and read/write attributes.
RoleInfo(String name, String className, boolean readable, boolean writable, int minDegree, int maxDegree, String description)
          Construct a role info with the given name, class name, read/write attributes, minimum/maximum degree and description.
 
Method Summary
 boolean checkMaxDegree(int value)
          Check to see whether a given value is less than or equal to the maximum degree.
 boolean checkMinDegree(int value)
          Check to see whether a given value is greater than or equal to the minimum degree.
 String getDescription()
          Retrieve the description of the role.
 int getMaxDegree()
          Retrieve the maximum degree.
 int getMinDegree()
          Retrieve the minimum degree.
 String getName()
          Retrieve the name of the role.
 String getRefMBeanClassName()
          Retrieve the class name of MBeans in this role.
 boolean isReadable()
          Retrieve the readable attribute.
 boolean isWritable()
          Retrieve the writable attribute.
 String toString()
          Retrieve a string description of the role info.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ROLE_CARDINALITY_INFINITY

public static int ROLE_CARDINALITY_INFINITY
A value used to specify an infinite number of mbeans are allowed in the role

Constructor Detail

RoleInfo

public RoleInfo(RoleInfo other)
         throws IllegalArgumentException
Copies the role info.

Parameters:
other - the role to copy.
Throws:
IllegalArgumentException - for a null value.

RoleInfo

public RoleInfo(String name,
                String className)
         throws IllegalArgumentException,
                ClassNotFoundException,
                NotCompliantMBeanException
Construct a role info with the given name and class name. It is set to read/writable with a minimum and maximum degree of 1. The description is null.

Parameters:
name - the name of the role.
className - the name of the MBean class.
Throws:
IllegalArgumentException - for a null value.
ClassNotFoundException - when the className does not exist.
NotCompliantMBeanException - when the className is not an mbean class.

RoleInfo

public RoleInfo(String name,
                String className,
                boolean readable,
                boolean writable)
         throws IllegalArgumentException,
                ClassNotFoundException,
                NotCompliantMBeanException
Construct a role info with the given name, class name and read/write attributes. It has a minimum and maximum degree of 1. The description is null.

Parameters:
name - the name of the role.
className - the name of the MBean class.
readable - true for readable, false otherwise.
writable - true for writable, false otherwise.
Throws:
IllegalArgumentException - for a null value.
ClassNotFoundException - when the className does not exist.
NotCompliantMBeanException - when the className is not an mbean class.

RoleInfo

public RoleInfo(String name,
                String className,
                boolean readable,
                boolean writable,
                int minDegree,
                int maxDegree,
                String description)
         throws IllegalArgumentException,
                ClassNotFoundException,
                NotCompliantMBeanException,
                InvalidRoleInfoException
Construct a role info with the given name, class name, read/write attributes, minimum/maximum degree and description. The description can be null.

Pass ROLE_CARDINALITY_INFINITY for an unlimited degree. The minimum must be less than or equal to the maximum.

Parameters:
name - the name of the role.
className - the name of the MBean class.
readable - true for readable, false otherwise.
writable - true for writable, false otherwise.
minDegree - the minimum degree.
maxDegree - the maximum degree.
description - the description.
Throws:
IllegalArgumentException - for a null value.
ClassNotFoundException - when the className does not exist.
NotCompliantMBeanException - when the className is not an mbean class.
InvalidRoleInfoException - when the minimum degree is greater than the maximum.
Method Detail

checkMinDegree

public boolean checkMinDegree(int value)
Check to see whether a given value is greater than or equal to the minimum degree.

Parameters:
value - the value to check.
Returns:
true when it is greater than or equal to the minimum degree, false otherwise.

checkMaxDegree

public boolean checkMaxDegree(int value)
Check to see whether a given value is less than or equal to the maximum degree.

Parameters:
value - the value to check.
Returns:
true when it is less than or equal to the maximum degree, false otherwise.

getDescription

public String getDescription()
Retrieve the description of the role.

Returns:
the description

getMinDegree

public int getMinDegree()
Retrieve the minimum degree.

Returns:
the minimum degree

getMaxDegree

public int getMaxDegree()
Retrieve the maximum degree.

Returns:
the maximum degree

getName

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

Returns:
the name

getRefMBeanClassName

public String getRefMBeanClassName()
Retrieve the class name of MBeans in this role.

Returns:
the class name

isReadable

public boolean isReadable()
Retrieve the readable attribute.

Returns:
true for readable, false otherwise

isWritable

public boolean isWritable()
Retrieve the writable attribute.

Returns:
true for writable, false otherwise

toString

public String toString()
Retrieve a string description of the role info.



Copyright © 2002 JBoss Group, LLC. All Rights Reserved.