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 | 
 
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
 
getName
public java.lang.String getName()
- Returns the name of this principal- 
- Specified by: 
- getNamein 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: 
- equalsin interface- java.security.Principal
- Overrides:
- equalsin class- java.lang.Object
 
- 
- Parameters:
- another- principal to compare with
- Returns:
- trueif the principal passed in is the same as
 this principal; otherwise- false
 
hashCode
public int hashCode()
- Returns a hashcode for this principal.- 
- Specified by: 
- hashCodein interface- java.security.Principal
- Overrides:
- hashCodein class- java.lang.Object
 
- 
- Returns:
- a hashcode for this principal.
 
Copyright © 1999-2007 The OpenJMS Group. All Rights Reserved.