org.jboss.test.security.ejb
Class CustomPrincipalImpl
java.lang.Object
org.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.
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 |
CustomPrincipalImpl
public CustomPrincipalImpl(java.lang.String name)
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.