|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.gedeon.telnetservice.jaasexample2.simplejaas.SamplePrincipal
public class SamplePrincipal
This class implements the Principal
interface
and represents a Sample user.
Principals such as this SamplePrincipal
may be associated with a particular Subject
to augment that Subject
with an additional
identity. Refer to the Subject
class for more information
on how to achieve this. Authorization decisions can then be based upon
the Principals associated with a Subject
.
Principal
,
Subject
,
Serialized FormConstructor Summary | |
---|---|
SamplePrincipal(String name)
Create a SamplePrincipal with a Sample username. |
Method Summary | |
---|---|
boolean |
equals(Object o)
Compares the specified Object with this SamplePrincipal
for equality. |
String |
getName()
Return the Sample username for this SamplePrincipal . |
int |
hashCode()
Return a hash code for this SamplePrincipal . |
String |
toString()
Return a string representation of this SamplePrincipal . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SamplePrincipal(String name)
name
- the Sample username for this user.
NullPointerException
- if the name
is null
.Method Detail |
---|
public String getName()
SamplePrincipal
.
getName
in interface Principal
SamplePrincipal
public String toString()
SamplePrincipal
.
toString
in interface Principal
toString
in class Object
SamplePrincipal
.public boolean equals(Object o)
SamplePrincipal
for equality. Returns true if the given object is also a
SamplePrincipal
and the two SamplePrincipals
have the same username.
equals
in interface Principal
equals
in class Object
o
- Object to be compared for equality with this
SamplePrincipal
.
SamplePrincipal
.public int hashCode()
SamplePrincipal
.
hashCode
in interface Principal
hashCode
in class Object
SamplePrincipal
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |