org.jboss.security.srp.jaas
Class SRPPrincipal

java.lang.Object
  extended by org.jboss.security.SimplePrincipal
      extended by org.jboss.security.srp.jaas.SRPPrincipal
All Implemented Interfaces:
Serializable, Principal

public class SRPPrincipal
extends org.jboss.security.SimplePrincipal

An extension of SimplePrincipal that adds the SRP session ID

Version:
$Revision: 57210 $
Author:
Scott.Stark@jboss.org
See Also:
Serialized Form

Constructor Summary
SRPPrincipal(String name)
          Creates a new instance of SRPPrincipal
SRPPrincipal(String name, int sessionID)
           
SRPPrincipal(String name, Integer sessionID)
           
 
Method Summary
 boolean equals(Object obj)
          Override to include the sessionID in the equality check
 int getSessionID()
           
 int hashCode()
          Override to include sessionID in the hash
 
Methods inherited from class org.jboss.security.SimplePrincipal
getName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SRPPrincipal

public SRPPrincipal(String name)
Creates a new instance of SRPPrincipal


SRPPrincipal

public SRPPrincipal(String name,
                    int sessionID)

SRPPrincipal

public SRPPrincipal(String name,
                    Integer sessionID)
Method Detail

getSessionID

public int getSessionID()

equals

public boolean equals(Object obj)
Override to include the sessionID in the equality check

Specified by:
equals in interface Principal
Overrides:
equals in class org.jboss.security.SimplePrincipal
Parameters:
obj - a SRPPrincipal
Returns:
true of name and sessionID are equal

hashCode

public int hashCode()
Override to include sessionID in the hash

Specified by:
hashCode in interface Principal
Overrides:
hashCode in class org.jboss.security.SimplePrincipal
Returns:
name.hashCode() + sessionID


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.