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

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


javax.management.relation
Class Role

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

public class Role
extends Object
implements Serializable

A role is a role name and an ordered list of object names to the MBeans in the role.

Version:
$Revision: 1.9 $

Revisions:

20020716 Adrian Brock:

  • Serialization
Author:
Adrian Brock
See Also:
Serialized Form

Constructor Summary
Role(String roleName, List roleValue)
          Construct a new role.
 
Method Summary
 Object clone()
          Clones the object.
 String getRoleName()
          Retrieve the role name.
 List getRoleValue()
          Retrieve the role value.
static String roleValueToString(List roleValue)
          Formats the role value for output.
 void setRoleName(String roleName)
          Set the role name.
 void setRoleValue(List roleValue)
          Set the role value it must be an ArrayList.
 String toString()
          Formats the role for output.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Role

public Role(String roleName,
            List roleValue)
     throws IllegalArgumentException
Construct a new role.

No validation is performed until the role is set of in a relation. Passed parameters must not be null.

The passed list must be an ArrayList.

Parameters:
roleName - the role name
roleValue - the MBean object names in the role
Throws:
IllegalArgumentException - for null values.
Method Detail

roleValueToString

public static String roleValueToString(List roleValue)
                                throws IllegalArgumentException
Formats the role value for output.

The spec says it should be a comma separated list of object names. But the RI uses new lines which makes more sense for object names.

Parameters:
roleValue - the role value to print
Returns:
the string representation
Throws:
IllegalArgumentException - for null value.

getRoleName

public String getRoleName()
Retrieve the role name.

Returns:
the role name.

getRoleValue

public List getRoleValue()
Retrieve the role value.

Returns:
a list of MBean object names.

setRoleName

public void setRoleName(String roleName)
                 throws IllegalArgumentException
Set the role name.

Parameters:
roleName - the role name.
Throws:
IllegalArgumentException - for a null value

setRoleValue

public void setRoleValue(List roleValue)
                  throws IllegalArgumentException
Set the role value it must be an ArrayList. A list of mbean object names.

Parameters:
roleValue - the role value.
Throws:
IllegalArgumentException - for a null value or not an array list

clone

public Object clone()
Clones the object.

Returns:
a copy of the role
Throws:
CloneNotSupportedException

toString

public String toString()
Formats the role for output.

Returns:
a human readable string


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