javax.wbem.client
public class UserPrincipal extends Object implements Principal
Constructor and Description |
---|
UserPrincipal(String userName)
This constructor accepts the user name.
|
UserPrincipal(String userName,
String hostName)
This constructor accepts the user name and host name.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object otherPrincipal)
The equals method checks if the specified object is the same principal as
this object.
|
String |
getHostName()
Return the host name associated with this principal.
|
String |
getName()
Return the name of this principal identity; that is, return the login
name.
|
String |
getUserName()
Return the principal's login user 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 UserPrincipal(String userName) throws IllegalArgumentException
userName
- - The user login name.IllegalArgumentException
- - If the userName
is null
.public UserPrincipal(String userName, String hostName) throws IllegalArgumentException
userName
- - The user login name.hostName
- - The host name.IllegalArgumentException
- - If the userName
is null
.public boolean equals(Object otherPrincipal)
UserPrincipal
and the user name and
authentication host name are the same.equals
in interface Principal
equals
in class Object
otherPrincipal
- - Principal
instance to compare for equality.true
if the object are equal; false
otherwise.Object.equals(java.lang.Object)
public String getHostName()
public String getName()
getName
in interface Principal
Principal.getName()
public String getUserName()
public int hashCode()
hashCode
in interface Principal
hashCode
in class Object
Object.hashCode()
public String toString()
toString
in interface Principal
toString
in class Object
Object.toString()
Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.