javax.wbem.client

Class RolePrincipal

public class RolePrincipal extends Object implements Principal

This class implements a Java security Principal identity for a role. That is, it represents the role name to be assumed on the remote WBEM Server.
Constructor Summary
RolePrincipal(String pRole)
This constructor accepts the user name.
Method Summary
booleanequals(Object pObj)
The equals method checks if the specified principal is the same principal as this object.
StringgetName()
Return the name of this principal identity; that is, return the Unix user login name.
inthashCode()
The hashCode() method returns an integer hash code to represent this principal.
StringtoString()
The toString() method returns a string representation of the principal suitable for displaying in messages.

Constructor Detail

RolePrincipal

public RolePrincipal(String pRole)
This constructor accepts the user name.

Parameters: pRole - The role name.

Method Detail

equals

public boolean equals(Object pObj)
The equals method checks if the specified principal is the same principal as this object. The principals are equal if the specified object is an instance of RolePrincipal and the user name is the same.

Parameters: pObj - The Principal to compare for equality.

Returns: true if they are equal, otherwise false.

See Also: java.lang.Object#equals(java.lang.Object)

getName

public String getName()
Return the name of this principal identity; that is, return the Unix user login name.

Returns: The name of this principal identity.

See Also: java.security.Principal#getName()

hashCode

public int hashCode()
The hashCode() method returns an integer hash code to represent this principal.

Returns: An integer hash code representing the principal.

See Also: java.lang.Object#hashCode()

toString

public String toString()
The toString() method returns a string representation of the principal suitable for displaying in messages. It should not be used for making authorization checks.

Returns: A printable string form of the role principal.

See Also: java.lang.Object#toString()

Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.