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 Role

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

Most common ways to construct:

Iterator iterator = …;

Role role = (Role)iterator.next();

Based on 14 examples

 

ArrayList roleValue = …;

Role role = new Role("RoleName", roleValue);

Based on 12 examples


public class Role
extends Object
implements Serializable

Represents a role: includes a role name and referenced MBeans (via their ObjectNames). The role value is always represented as an ArrayList collection (of ObjectNames) to homogenize the access.

The serialVersionUID of this class is -279985518429862552L.


Constructor Summary
Role(String roleName, List roleValue)

          Make a new Role object.
 
Method Summary
 Object

          Clone the role object.
 String

          Retrieves role name.
 List

          Retrieves role value.
static String

          Returns a string for the given role value.
 void
setRoleName(String roleName)

          Sets role name.
 void
setRoleValue(List roleValue)

          Sets role value.
 String

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

Constructor Detail

Role

public Role(String roleName,
            List roleValue)
     throws IllegalArgumentException

Make a new Role object. No check is made that the ObjectNames in the role value exist in an MBean server. That check will be made when the role is set in a relation.

Parameters:
roleName - role name
roleValue - role value (List of ObjectName objects)
Throws:
IllegalArgumentException - if null parameter
Method Detail

clone

public Object clone()
Clone the role object.

Overrides:
clone in class Object
Returns:
a Role that is an independent copy of the current Role object.

getRoleName

public String getRoleName()
Retrieves role name.

Returns:
the role name.

getRoleValue

public List getRoleValue()
Retrieves role value.

Returns:
ArrayList of ObjectName objects for referenced MBeans.

roleValueToString

public static String roleValueToString(List roleValue)
                                throws IllegalArgumentException
Returns a string for the given role value.

Parameters:
roleValue - List of ObjectName objects
Returns:
A String consisting of the ObjectNames separated by newlines (\n).
Throws:
IllegalArgumentException - if null parameter

setRoleName

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

Parameters:
roleName - role name
Throws:
IllegalArgumentException - if null parameter

setRoleValue

public void setRoleValue(List roleValue)
                  throws IllegalArgumentException
Sets role value.

Parameters:
roleValue - List of ObjectName objects for referenced MBeans.
Throws:
IllegalArgumentException - if null parameter

toString

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

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


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/.