org.dhmp.security
Class User

java.lang.Object
  extended byorg.dhmp.security.User
All Implemented Interfaces:
java.security.Principal, java.io.Serializable

public class User
extends java.lang.Object
implements java.security.Principal, java.io.Serializable

Principal that represents the user

See Also:
Serialized Form

Constructor Summary
User(java.lang.String name)
          Constructs a new instance.
User(java.lang.String name, javax.security.auth.Subject subject)
          Constructs a new instance.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getName()
          Retrieves the user's name.
 javax.security.auth.Subject getSubject()
          Retrieves the current Subject.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.security.Principal
toString
 

Constructor Detail

User

public User(java.lang.String name)
Constructs a new instance.

Parameters:
name - representing this user.

User

public User(java.lang.String name,
            javax.security.auth.Subject subject)
Constructs a new instance.

Parameters:
name - representing this user.
Method Detail

getName

public java.lang.String getName()
Retrieves the user's name. return user name.

Specified by:
getName in interface java.security.Principal

getSubject

public javax.security.auth.Subject getSubject()
Retrieves the current Subject. return user subject.


equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface java.security.Principal

hashCode

public int hashCode()
Specified by:
hashCode in interface java.security.Principal