Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.management.relation
Class Role  view Role download Role.java

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

public class Role
extends java.lang.Object
implements java.io.Serializable

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

Version:
$Revision: 1.4.6.2 $

Revisions:

20020716 Adrian Brock:

  • Serialization

Field Summary
private  java.lang.String name
          The role name
private  java.util.List objectNameList
          An ordered list of MBean object names.
private static java.io.ObjectStreamField[] serialPersistentFields
           
private static long serialVersionUID
           
 
Constructor Summary
Role(java.lang.String roleName, java.util.List roleValue)
          Construct a new role.
 
Method Summary
 java.lang.Object clone()
          Clones the object.
 java.lang.String getRoleName()
          Retrieve the role name.
 java.util.List getRoleValue()
          Retrieve the role value.
private  void readObject(java.io.ObjectInputStream ois)
           
static java.lang.String roleValueToString(java.util.List roleValue)
          Formats the role value for output.
 void setRoleName(java.lang.String roleName)
          Set the role name.
 void setRoleValue(java.util.List roleValue)
          Set the role value it must be an ArrayList.
 java.lang.String toString()
          Formats the role for output.
private  void writeObject(java.io.ObjectOutputStream oos)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private java.lang.String name
The role name


objectNameList

private java.util.List objectNameList
An ordered list of MBean object names.


serialVersionUID

private static final long serialVersionUID

serialPersistentFields

private static final java.io.ObjectStreamField[] serialPersistentFields
Constructor Detail

Role

public Role(java.lang.String roleName,
            java.util.List roleValue)
     throws java.lang.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.

Method Detail

roleValueToString

public static java.lang.String roleValueToString(java.util.List roleValue)
                                          throws java.lang.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.


getRoleName

public java.lang.String getRoleName()
Retrieve the role name.


getRoleValue

public java.util.List getRoleValue()
Retrieve the role value.


setRoleName

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


setRoleValue

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


clone

public java.lang.Object clone()
Clones the object.


toString

public java.lang.String toString()
Formats the role for output.


readObject

private void readObject(java.io.ObjectInputStream ois)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException

writeObject

private void writeObject(java.io.ObjectOutputStream oos)
                  throws java.io.IOException