javax.wbem.client
Class RolePrincipal

java.lang.Object
  extended byjavax.wbem.client.RolePrincipal
All Implemented Interfaces:
java.security.Principal

public class RolePrincipal
extends java.lang.Object
implements java.security.Principal

This class implements a Principal identity for a role. That is, it represents the role name to be assumed on the remote WBEM Server.

Since:
JSR48 1.0.0

Constructor Summary
RolePrincipal(java.lang.String role)
          This constructor accepts the user name.
 
Method Summary
 boolean equals(java.lang.Object p)
          The equals method checks if the specified principal is the same principal as this object.
 java.lang.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.
 java.lang.String toString()
          The toString method returns a string representation of the principal suitable for displaying in messages.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RolePrincipal

public RolePrincipal(java.lang.String role)
This constructor accepts the user name.

Parameters:
role - The role name.
Method Detail

equals

public boolean equals(java.lang.Object p)
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.

Specified by:
equals in interface java.security.Principal
Parameters:
p - The Principal to compare for equality
Returns:
true if they are equal, otherwise false.

getName

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

Specified by:
getName in interface java.security.Principal
Returns:
The name of this principal identity.

hashCode

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

Specified by:
hashCode in interface java.security.Principal
Returns:
An integer hash code representing the principal.

toString

public java.lang.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.

Specified by:
toString in interface java.security.Principal
Returns:
A printable string form of the role principal.


Java™ WBEM (JSR48) 1.0.0 API