IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
 
[Sommaire]  [Top 50]  [F.A.Q.]  [ Java SE ]  [ Java EE ]  [Javadoc standard]  [Contact]
[ 1.4.2 ]  [ 5.0 ]  [ 6.0
Rechercher   
Dans
Options   sensible à la casse
étendre la recherche aux descriptions
Préférences
fr en 
 
Moteurs de recherche
JavaTM 2 Platform Std. Ed. v1.5.0

javax.management.relation
Class Role

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

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.

Since:
1.5
See Also:
Serialized Form

Constructor Summary
Role(String theRoleName, List theRoleValue)
          Make a new Role object.
 
Method Summary
 Object clone()
          Clone the role object.
 String getRoleName()
          Retrieves role name.
 List getRoleValue()
          Retrieves role value.
static String roleValueToString(List theRoleValue)
          Returns a string for the given role value.
 void setRoleName(String theRoleName)
          Sets role name.
 void setRoleValue(List theRoleValue)
          Sets role value.
 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(String theRoleName,
            List theRoleValue)
     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:
theRoleName - role name
theRoleValue - role value (List of ObjectName objects)
Throws:
IllegalArgumentException - if null parameter
Method Detail

getRoleName

public String getRoleName()
Retrieves role name.

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

getRoleValue

public List getRoleValue()
Retrieves role value.

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

setRoleName

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

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

setRoleValue

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

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

toString

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

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

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.
See Also:
Cloneable

roleValueToString

public static String roleValueToString(List theRoleValue)
                                throws 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:
IllegalArgumentException - if null parameter

Copyright 2003 Sun Microsystems, Inc. All rights reserved