Overview | Package | Class | Use | Tree | Deprecated | Index | Help
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 homogeneise the access.

Author:
  Young Yang
See Also:
  Serialized Form

Constructor Summary
`Role(java.lang.String roleName, java.util.List roleValue)` Constructor No verification about the provided ObjectNames, no need for them to be registered at this level.

Method Summary
`java.lang.Object` | `clone()` Cloning
`java.lang.String` | `getRoleName()` Retrieves role name
`java.util.List` | `getRoleValue()` Retrieves role value
`static java.lang.String` | `roleValueToString(java.util.List roleValue)` Returns a string for the given role value
`void` | `setRoleName(java.lang.String roleName)` Sets role name
`void` | `setRoleValue(java.util.List roleValue)` Sets role value
`java.lang.String` | `toString()` Prints 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 roleName,
                java.util.List roleValue)
         throws java.lang.IllegalArgumentException

  Constructor

  No verification about the provided ObjectNames, no need for them to be registered at this level. This checking will be made when trying to set a relation role.

Parameters:
  `roleName` - role name
  `roleValue` - role value (ArrayList of ObjectName objects)
Throws:
  `java.lang.IllegalArgumentException` - if null parameter

Method Detail

### getRoleName

    public java.lang.String getRoleName()

  Retrieves role name

### getRoleValue

    public java.util.List getRoleValue()

  Retrieves role value

  Returns:
    ArrayList of ObjectName objects for referenced MBeans.

### setRoleName

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

  Sets role name

  Parameters:
    `roleName` - role name
  Throws:
    `java.lang.IllegalArgumentException` - if null parameter

### setRoleValue

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

  Sets role value

  Parameters:
    `roleValue` - ArrayList of ObjectName objects for referenced MBeans.
  Throws:
    `java.lang.IllegalArgumentException` - if null parameter

### toString

    public java.lang.String toString()

  Prints a string describing the role

  Overrides:
    `toString` in class `java.lang.Object`

### clone

    public java.lang.Object clone()

  Cloning

  Overrides:
    `clone` in class `java.lang.Object`
  Returns:
    a Role being an independent copy of the current Role object.

### roleValueToString

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

  Returns a string for the given role value

  Parameters:
    `roleValue` - ArrayList of ObjectName objects
  Returns:
    String being the ObjectNames separated by commas.
  Throws:
    `java.lang.IllegalArgumentException` - if null parameter

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