org.apache.geronimo.security
Class RealmPrincipal

java.lang.Object
  extended byorg.apache.geronimo.security.RealmPrincipal
All Implemented Interfaces:
Principal, Serializable
Direct Known Subclasses:
PrimaryRealmPrincipal

public class RealmPrincipal
extends Object
implements Principal, Serializable

Represents a principal in an realm.

Version:
$Revision: 1.5 $ $Date: 2004/03/10 09:59:25 $
See Also:
Serialized Form

Constructor Summary
RealmPrincipal(String realm, Principal principal)
           
 
Method Summary
 boolean equals(Object another)
          Compares this principal to the specified object.
 long getId()
           
 String getName()
          Returns the name of this principal.
 Principal getPrincipal()
          Returns the principal that is associated with the realm.
 String getRealm()
          Returns the realm that is associated with the principal.
 int hashCode()
          Returns a hashcode for this principal.
 String toString()
          Returns a string representation of this principal.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RealmPrincipal

public RealmPrincipal(String realm,
                      Principal principal)
Method Detail

getId

public long getId()

equals

public boolean equals(Object another)
Compares this principal to the specified object. Returns true if the object passed in matches the principal represented by the implementation of this interface.

Specified by:
equals in interface Principal
Parameters:
another - principal to compare with.
Returns:
true if the principal passed in is the same as that encapsulated by this principal, and false otherwise.

toString

public String toString()
Returns a string representation of this principal.

Specified by:
toString in interface Principal
Returns:
a string representation of this principal.

hashCode

public int hashCode()
Returns a hashcode for this principal.

Specified by:
hashCode in interface Principal
Returns:
a hashcode for this principal.

getName

public String getName()
Returns the name of this principal.

Specified by:
getName in interface Principal
Returns:
the name of this principal.

getPrincipal

public Principal getPrincipal()
Returns the principal that is associated with the realm.

Returns:
the principal that is associated with the realm.

getRealm

public String getRealm()
Returns the realm that is associated with the principal.

Returns:
the realm that is associated with the principal.


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.