FileDocCategorySizeDatePackage
RoleResult.javaAPI DocJava SE 6 API6488Tue Jun 10 00:26:18 BST 2008javax.management.relation

RoleResult

public class RoleResult extends Object implements Serializable
Represents the result of a multiple access to several roles of a relation (either for reading or writing).

The serialVersionUID of this class is -6304063118040985512L.

since
1.5

Fields Summary
private static final long
oldSerialVersionUID
private static final long
newSerialVersionUID
private static final ObjectStreamField[]
oldSerialPersistentFields
private static final ObjectStreamField[]
newSerialPersistentFields
private static final long
serialVersionUID
private static final ObjectStreamField[]
serialPersistentFields
private static boolean
compat
private RoleList
roleList
private RoleUnresolvedList
unresolvedRoleList
Constructors Summary
public RoleResult(RoleList list, RoleUnresolvedList unresolvedList)
Constructor.

param
list list of roles successfully accessed.
param
unresolvedList list of roles not accessed (with problem descriptions).


    //
    // Constructor
    //

                             
      
		        

	setRoles(list);
	setRolesUnresolved(unresolvedList);
	return;
    
Methods Summary
public javax.management.relation.RoleListgetRoles()
Retrieves list of roles successfully accessed.

return
a RoleList
see
#setRoles

	return roleList;
    
public javax.management.relation.RoleUnresolvedListgetRolesUnresolved()
Retrieves list of roles unsuccessfully accessed.

return
a RoleUnresolvedList.
see
#setRolesUnresolved

	return unresolvedRoleList;
    
private voidreadObject(java.io.ObjectInputStream in)
Deserializes a {@link RoleResult} from an {@link ObjectInputStream}.

      if (compat)
      {
        // Read an object serialized in the old serial form
        //
        ObjectInputStream.GetField fields = in.readFields();
	roleList = (RoleList) fields.get("myRoleList", null);
	if (fields.defaulted("myRoleList"))
        {
          throw new NullPointerException("myRoleList");
        }
	unresolvedRoleList = (RoleUnresolvedList) fields.get("myRoleUnresList", null);
	if (fields.defaulted("myRoleUnresList"))
        {
          throw new NullPointerException("myRoleUnresList");
        }
      }
      else
      {
        // Read an object serialized in the new serial form
        //
        in.defaultReadObject();
      }
    
public voidsetRoles(javax.management.relation.RoleList list)
Sets list of roles successfully accessed.

param
list list of roles successfully accessed
see
#getRoles

	if (list != null) {

	    roleList = new RoleList();

	    for (Iterator roleIter = list.iterator();
		 roleIter.hasNext();) {
		Role currRole = (Role)(roleIter.next());
		roleList.add((Role)(currRole.clone()));
	    }
	} else {
	    roleList = null;
	}
	return;
    
public voidsetRolesUnresolved(javax.management.relation.RoleUnresolvedList unresolvedList)
Sets list of roles unsuccessfully accessed.

param
unresolvedList list of roles unsuccessfully accessed
see
#getRolesUnresolved

	if (unresolvedList != null) {

	    unresolvedRoleList = new RoleUnresolvedList();

	    for (Iterator roleUnresIter = unresolvedList.iterator();
		 roleUnresIter.hasNext();) {
		RoleUnresolved currRoleUnres =
		    (RoleUnresolved)(roleUnresIter.next());
		unresolvedRoleList.add((RoleUnresolved)(currRoleUnres.clone()));
	    }
	} else {
	    unresolvedRoleList = null;
	}
	return;
    
private voidwriteObject(java.io.ObjectOutputStream out)
Serializes a {@link RoleResult} to an {@link ObjectOutputStream}.

      if (compat)
      {
        // Serializes this instance in the old serial form
        //
        ObjectOutputStream.PutField fields = out.putFields();
	fields.put("myRoleList", roleList);
	fields.put("myRoleUnresList", unresolvedRoleList);
	out.writeFields();
      }
      else
      {
        // Serializes this instance in the new serial form
        //
        out.defaultWriteObject();
      }