org.jboss.test.security.ejb
Class CustomPrincipalImpl

java.lang.Object
  extended byorg.jboss.test.security.ejb.CustomPrincipalImpl
All Implemented Interfaces:
java.security.Principal

public class CustomPrincipalImpl
extends java.lang.Object
implements java.security.Principal

A custom Principal implementation. This class must compare to other Principals based on the Principal.getName() hashCode and equality.


Constructor Summary
CustomPrincipalImpl(java.lang.String name)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getName()
          Returns the name of this principal.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CustomPrincipalImpl

public CustomPrincipalImpl(java.lang.String name)
Method Detail

hashCode

public int hashCode()
Specified by:
hashCode in interface java.security.Principal

equals

public boolean equals(java.lang.Object obj)
Specified by:
equals in interface java.security.Principal

toString

public java.lang.String toString()
Specified by:
toString in interface java.security.Principal

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.