org.exolab.jms.common.security
Class BasicPrincipal

java.lang.Object
  |
  +--org.exolab.jms.common.security.BasicPrincipal
All Implemented Interfaces:
java.security.Principal, java.io.Serializable

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

BasicPrincipal associates a user name with a password

Version:
$Revision: 1.1 $ $Date: 2004/11/26 01:50:34 $
Author:
Tim Anderson
See Also:
Serialized Form

Constructor Summary
BasicPrincipal(java.lang.String name, java.lang.String password)
          Construct a new Principal
 
Method Summary
 boolean equals(java.lang.Object another)
          Compares this principal to the specified object.
 java.lang.String getName()
          Returns the name of this principal
 java.lang.String getPassword()
          Returns the password of this principal
 int hashCode()
          Returns a hashcode for this principal.
 
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

BasicPrincipal

public BasicPrincipal(java.lang.String name,
                      java.lang.String password)
Construct a new Principal
Parameters:
name - the principal's name
password - the principal's password
Method Detail

getName

public java.lang.String getName()
Returns the name of this principal
Specified by:
getName in interface java.security.Principal
Returns:
the name of this principal

getPassword

public java.lang.String getPassword()
Returns the password of this principal
Returns:
the password of this principal

equals

public boolean equals(java.lang.Object another)
Compares this principal to the specified object.
Specified by:
equals in interface java.security.Principal
Overrides:
equals in class java.lang.Object
Parameters:
another - principal to compare with
Returns:
true if the principal passed in is the same as this principal; otherwise false

hashCode

public int hashCode()
Returns a hashcode for this principal.
Specified by:
hashCode in interface java.security.Principal
Overrides:
hashCode in class java.lang.Object
Returns:
a hashcode for this principal.


Copyright © 1999-2007 The OpenJMS Group. All Rights Reserved.