FileDocCategorySizeDatePackage
RoleResult.javaAPI DocJava SE 5 API6468Fri Aug 26 14:57:38 BST 2005javax.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).
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 theRoleList, RoleUnresolvedList theRoleUnresList)
Constructor.

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


    //
    // Constructor
    //

                             
      
		        

	setRoles(theRoleList);
	setRolesUnresolved(theRoleUnresList);
	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 theRoleList)
Sets list of roles successfully accessed.

param
theRoleList list of roles successfully accessed
see
#getRoles

	if (theRoleList != null) {

	    roleList = new RoleList();

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

param
theRoleUnresList list of roles unsuccessfully accessed
see
#getRolesUnresolved

	if (theRoleUnresList != null) {

	    unresolvedRoleList = new RoleUnresolvedList();

	    for (Iterator roleUnresIter = theRoleUnresList.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();
      }