javax.wbem.client
public class RolePrincipal extends Object implements Principal
RolePrincipal
implements a Principal identity for a role. That
is, it represents the role name to be assumed on a system.
RolePrincipal
includes the role and optionally the host
information for which the role is used to authenticate.Constructor and Description |
---|
RolePrincipal(String pRole)
This constructor accepts the role name.
|
RolePrincipal(String pRole,
String pHost)
This constructor accepts the role name and host name.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object pObj)
The equals method checks if the specified principal is the same principal
as this object.
|
String |
getHostName()
Get the host for which the principal uses to authenticate
|
String |
getName()
Return the name of this principal identity; that is, return the login
name.
|
int |
hashCode()
The
hashCode() method returns an integer hash code to
represent this principal. |
String |
toString()
The
toString() method returns a string representation of the
principal suitable for displaying in messages. |
public RolePrincipal(String pRole)
pRole
- - The role name.public boolean equals(Object pObj)
RolePrincipal
and the user name and
authentication host name are the same.equals
in interface Principal
equals
in class Object
pObj
- - The Principal to compare for equality.true
if they are equal, otherwise false
.Object.equals(java.lang.Object)
public String getHostName()
public String getName()
getName
in interface Principal
Principal.getName()
public int hashCode()
hashCode()
method returns an integer hash code to
represent this principal.hashCode
in interface Principal
hashCode
in class Object
Object.hashCode()
public String toString()
toString()
method returns a string representation of the
principal suitable for displaying in messages. It should not be used for
making authorization checks.toString
in interface Principal
toString
in class Object
Object.toString()
Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.