org.jboss.security.srp.jaas
Class SRPPrincipal

java.lang.Object
  extended byorg.jboss.security.SimplePrincipal (src) 
      extended byorg.jboss.security.srp.jaas.SRPPrincipal
All Implemented Interfaces:
java.security.Principal, java.io.Serializable

public class SRPPrincipal
extends SimplePrincipal (src)

An extension of SimplePrincipal that adds the SRP session ID

See Also:
Serialized Form

Constructor Summary
SRPPrincipal(java.lang.String name)
          Creates a new instance of SRPPrincipal
SRPPrincipal(java.lang.String name, int sessionID)
           
SRPPrincipal(java.lang.String name, java.lang.Integer sessionID)
           
 
Method Summary
 boolean equals(java.lang.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 (src)
getName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SRPPrincipal

public SRPPrincipal(java.lang.String name)
Creates a new instance of SRPPrincipal


SRPPrincipal

public SRPPrincipal(java.lang.String name,
                    int sessionID)

SRPPrincipal

public SRPPrincipal(java.lang.String name,
                    java.lang.Integer sessionID)
Method Detail

getSessionID

public int getSessionID()

equals

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

Specified by:
equals in interface java.security.Principal
Overrides:
equals in class SimplePrincipal (src)
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 java.security.Principal
Overrides:
hashCode in class SimplePrincipal (src)
Returns:
name.hashCode() + sessionID