Top Description Fields Constructors Methods
javax.management.relation

public Class Role

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Annotations
@SuppressWarnings:serial
Static Imports
com.sun.jmx.mbeanserver.Util.cast

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.

Since
1.5

Field Summary

Modifier and TypeField and Description
private static boolean
private String
private static final ObjectStreamField[]
private static final long
private List<ObjectName>
private static final ObjectStreamField[]
private static final long
private static final ObjectStreamField[]
private static final long

Constructor Summary

AccessConstructor and Description
public
Role(String
role name
roleName
,
List<ObjectName>
role value (List of ObjectName objects)
roleValue
)

Make a new Role object.

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

a Role that is an independent copy of the current Role object.
clone
()

Overrides java.lang.Object.clone.

Clone the role object.

public String

Returns:

the role name.
getRoleName
()

Retrieves role name.

public List<ObjectName>

Returns:

ArrayList of ObjectName objects for referenced MBeans.
getRoleValue
()

Retrieves role value.

private void
public static String

Returns:

A String consisting of the ObjectNames separated by newlines (\n).
roleValueToString
(List<ObjectName>
List of ObjectName objects
roleValue
)

Returns a string for the given role value.

public void
setRoleName(String
role name
roleName
)

Sets role name.

public void
setRoleValue(List<ObjectName>
List of ObjectName objects for referenced MBeans.
roleValue
)

Sets role value.

public String

Returns:

the description of the role.
toString
()

Overrides java.lang.Object.toString.

Returns a string describing the role.

private void
Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

compatback to summary
private static boolean compat
nameback to summary
private String name
newSerialPersistentFieldsback to summary
private static final ObjectStreamField[] newSerialPersistentFields
newSerialVersionUIDback to summary
private static final long newSerialVersionUID
objectNameListback to summary
private List<ObjectName> objectNameList
oldSerialPersistentFieldsback to summary
private static final ObjectStreamField[] oldSerialPersistentFields
oldSerialVersionUIDback to summary
private static final long oldSerialVersionUID
serialPersistentFieldsback to summary
private static final ObjectStreamField[] serialPersistentFields
Serial Fields:
name:String
Role name
objectNameList:List
List of ObjectNames of referenced MBeans
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

Roleback to summary
public Role(String roleName, List<ObjectName> 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:String

role name

roleValue:List<ObjectName>

role value (List of ObjectName objects)

Exceptions
IllegalArgumentException:
if null parameter

Method Detail

cloneback to summary
public Object clone()

Overrides java.lang.Object.clone.

Clone the role object.

Returns:Object

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

getRoleNameback to summary
public String getRoleName()

Retrieves role name.

Returns:String

the role name.

See Also
setRoleName
getRoleValueback to summary
public List<ObjectName> getRoleValue()

Retrieves role value.

Returns:List<ObjectName>

ArrayList of ObjectName objects for referenced MBeans.

See Also
setRoleValue
readObjectback to summary
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException

Deserializes a Role from an ObjectInputStream.

roleValueToStringback to summary
public static String roleValueToString(List<ObjectName> roleValue) throws IllegalArgumentException

Returns a string for the given role value.

Parameters
roleValue:List<ObjectName>

List of ObjectName objects

Returns:String

A String consisting of the ObjectNames separated by newlines (\n).

Exceptions
IllegalArgumentException:
if null parameter
setRoleNameback to summary
public void setRoleName(String roleName) throws IllegalArgumentException

Sets role name.

Parameters
roleName:String

role name

Exceptions
IllegalArgumentException:
if null parameter
See Also
getRoleName
setRoleValueback to summary
public void setRoleValue(List<ObjectName> roleValue) throws IllegalArgumentException

Sets role value.

Parameters
roleValue:List<ObjectName>

List of ObjectName objects for referenced MBeans.

Exceptions
IllegalArgumentException:
if null parameter
See Also
getRoleValue
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string describing the role.

Returns:String

the description of the role.

writeObjectback to summary
private void writeObject(ObjectOutputStream out) throws IOException

Serializes a Role to an ObjectOutputStream.