Package de.xima.fc.user.presence
Class UserId
- java.lang.Object
-
- de.xima.fc.user.presence.UserId
-
- All Implemented Interfaces:
Serializable
public final class UserId extends Object implements Serializable
Identifies a user for presence tracking independently of their tracked views.- Since:
- 8.6.0
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UserIdanonymous()Returns a user identifier for an anonymous user.booleanequals(Object o)StringgetValue()The string representation of this identifier.inthashCode()static UserIdof(@NotEmpty String userId)Creates an identifier from a string.static UserIdsuperUser()Returns a user identifier for the super user.StringtoString()
-
-
-
Method Detail
-
of
public static UserId of(@NotEmpty @NotEmpty String userId)
Creates an identifier from a string.- Parameters:
userId- the identifier string- Returns:
- the user identifier
- Throws:
NullPointerException- ifuserIdis null- Since:
- 8.6.0
-
superUser
public static UserId superUser()
Returns a user identifier for the super user.- Returns:
- the super user identifier
- Since:
- 8.6.0
-
anonymous
public static UserId anonymous()
Returns a user identifier for an anonymous user.- Returns:
- the anonymous user identifier
- Since:
- 8.6.0
-
getValue
public String getValue()
The string representation of this identifier.- Since:
- 8.6.0
-
-