Package alluxio.security
Class CurrentUser
- java.lang.Object
-
- alluxio.security.CurrentUser
-
- All Implemented Interfaces:
java.security.Principal
@ThreadSafe public final class CurrentUser extends java.lang.Object implements java.security.Principal
This class represents the current user, which represents the end user. This may differ from the Alluxio login user,User
.
-
-
Constructor Summary
Constructors Constructor Description CurrentUser(java.lang.String name)
Constructs a new user with a name.CurrentUser(java.lang.String name, java.lang.String serviceName)
Constructs a new user with a name and a service name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getName()
java.lang.String
getServiceName()
int
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
CurrentUser
public CurrentUser(java.lang.String name)
Constructs a new user with a name.- Parameters:
name
- the name of the user
-
CurrentUser
public CurrentUser(java.lang.String name, java.lang.String serviceName)
Constructs a new user with a name and a service name.- Parameters:
name
- the name of the userserviceName
- the name of the service
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfacejava.security.Principal
-
toString
public java.lang.String toString()
- Specified by:
toString
in interfacejava.security.Principal
- Overrides:
toString
in classjava.lang.Object
-
getServiceName
public java.lang.String getServiceName()
- Returns:
- the service name
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacejava.security.Principal
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interfacejava.security.Principal
- Overrides:
equals
in classjava.lang.Object
-
-