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
-
-
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.String
toString()
Get a representation of the principal name (always "anonymous").
-
-
-
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.
-
-