Class AnonymousPrincipal
- java.lang.Object
-
- org.wildfly.security.auth.principal.AnonymousPrincipal
-
- All Implemented Interfaces:
Serializable,Principal
public final class AnonymousPrincipal extends Object implements Principal, Serializable
The singleton anonymous principal.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static AnonymousPrincipalINSTANCEprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description AnonymousPrincipal()Construct a new instance (should not be used; callgetInstance()instead).AnonymousPrincipal(String ignored)Construct a new instance (should not be used; callgetInstance()instead).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Determine whether the given object is also an anonymous principal.static AnonymousPrincipalgetInstance()Get the anonymous principal instance.StringgetName()Get the principal name (always "anonymous").inthashCode()Get the hash code of this principal.(package private) ObjectreadResolve()StringtoString()Get a representation of the principal name (always "anonymous").(package private) ObjectwriteReplace()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
INSTANCE
private static final AnonymousPrincipal INSTANCE
-
-
Constructor Detail
-
AnonymousPrincipal
public AnonymousPrincipal()
Construct a new instance (should not be used; callgetInstance()instead).
-
AnonymousPrincipal
public AnonymousPrincipal(String ignored)
Construct a new instance (should not be used; callgetInstance()instead).- Parameters:
ignored- ignored
-
-
Method Detail
-
getInstance
public static AnonymousPrincipal getInstance()
Get the anonymous principal instance.- Returns:
- the anonymous principal instance
-
getName
public String getName()
Get the principal name (always "anonymous").
-
equals
public boolean equals(Object o)
Determine whether the given object is also an anonymous principal.
-
hashCode
public int hashCode()
Get the hash code of this principal.
-
toString
public String toString()
Get a representation of the principal name (always "anonymous").
-
writeReplace
Object writeReplace()
-
readResolve
Object readResolve()
-
-