java.lang.Object
jdk.net.UnixDomainPrincipal
Represents the credentials of a peer connected to a
Unix domain socket.
- Since:
- 16
-
Constructor Summary
ConstructorsConstructorDescriptionUnixDomainPrincipal(UserPrincipal user, GroupPrincipal group)Creates a UnixDomainPrincipal. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true ifobjis aUnixDomainPrincipaland its user and group are equal to this user and group.group()Returns this object'sGroupPrincipalinthashCode()Returns a hashcode calculated from the user and groupuser()Returns this object'sUserPrincipal
-
Constructor Details
-
UnixDomainPrincipal
Creates a UnixDomainPrincipal.- Parameters:
user- the user identitygroup- the group identity- Throws:
NullPointerException- ifuserorgrouparenull.
-
-
Method Details
-
equals
Returns true ifobjis aUnixDomainPrincipaland its user and group are equal to this user and group.- Overrides:
equalsin classObject- Parameters:
obj- the object to compare with- Returns:
- true if this equal to obj
- See Also:
Object.hashCode(),HashMap
-
hashCode
public int hashCode()Returns a hashcode calculated from the user and group- Overrides:
hashCodein classObject- Returns:
- a hash code value for this object.
- See Also:
Object.equals(java.lang.Object),System.identityHashCode(java.lang.Object)
-
user
Returns this object'sUserPrincipal- Returns:
- this object's user
-
group
Returns this object'sGroupPrincipal- Returns:
- this object's user
-