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 AnonymousPrincipal
INSTANCE
private static long
serialVersionUID
-
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 boolean
equals(Object o)
Determine whether the given object is also an anonymous principal.static AnonymousPrincipal
getInstance()
Get the anonymous principal instance.String
getName()
Get the principal name (always "anonymous").int
hashCode()
Get the hash code of this principal.(package private) Object
readResolve()
String
toString()
Get a representation of the principal name (always "anonymous").(package private) Object
writeReplace()
-
-
-
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()
-
-