Overview | Package | Class | Tree | Deprecated | Index | Help
| J2EE1.4 SDK
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.management.relation
Class Role

    java.lang.Object
      javax.management.relation.Role

All Implemented Interfaces:
  java.io.Serializable

public class Role
extends java.lang.Object
implements java.io.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.

See Also:
  Serialized Form

Constructor Summary
`Role(java.lang.String theRoleName, java.util.List theRoleValue)` Make a new Role object.

Method Summary
`java.lang.Object` | `clone()` Clone the role object.
`java.lang.String` | `getRoleName()` Retrieves role name.
`java.util.List` | `getRoleValue()` Retrieves role value.
`static java.lang.String` | `roleValueToString(java.util.List theRoleValue)` Returns a string for the given role value.
`void` | `setRoleName(java.lang.String theRoleName)` Sets role name.
`void` | `setRoleValue(java.util.List theRoleValue)` Sets role value.
`java.lang.String` | `toString()` Returns a string describing the role.

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Role

    public Role(java.lang.String theRoleName,
                java.util.List theRoleValue)
         throws java.lang.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:
  `theRoleName` - role name
  `theRoleValue` - role value (List of ObjectName objects)
Throws:
  `java.lang.IllegalArgumentException` - if null parameter

Method Detail

### getRoleName

    public java.lang.String getRoleName()

  Retrieves role name.

  Returns:
    the role name.
  See Also:
    `setRoleName(java.lang.String)`

### getRoleValue

    public java.util.List getRoleValue()

  Retrieves role value.

  Returns:
    ArrayList of ObjectName objects for referenced MBeans.
  See Also:
    `setRoleValue(java.util.List)`

### setRoleName

    public void setRoleName(java.lang.String theRoleName)
                     throws java.lang.IllegalArgumentException

  Sets role name.

  Parameters:
    `theRoleName` - role name
  Throws:
    `java.lang.IllegalArgumentException` - if null parameter
  See Also:
    `getRoleName()`

### setRoleValue

    public void setRoleValue(java.util.List theRoleValue)
                      throws java.lang.IllegalArgumentException

  Sets role value.

  Parameters:
    `theRoleValue` - List of ObjectName objects for referenced MBeans.
  Throws:
    `java.lang.IllegalArgumentException` - if null parameter
  See Also:
    `getRoleValue()`

### toString

    public java.lang.String toString()

  Returns a string describing the role.

  Returns:
    the description of the role.

### clone

    public java.lang.Object clone()

  Clone the role object.

  Returns:
    a Role that is an independent copy of the current Role object.

### roleValueToString

    public static java.lang.String roleValueToString(java.util.List theRoleValue)
                                              throws java.lang.IllegalArgumentException

  Returns a string for the given role value.

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

Overview | Package | Class | Tree | Deprecated | Index | Help
| J2EE1.4 SDK
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug or feature

Copyright 2003 Sun Microsystems, Inc. All rights reserved.