java.lang.Object
jdk.net.UnixDomainPrincipal
public final class UnixDomainPrincipal extends Object
Represents the credentials of a peer connected to a Unix domain socket.
- Since:
- 16
-
Constructor Summary
Constructors Constructor Description UnixDomainPrincipal(UserPrincipal user, GroupPrincipal group)
Creates a UnixDomainPrincipal. -
Method Summary
Modifier and Type Method Description boolean
equals(Object obj)
Returns true ifobj
is aUnixDomainPrincipal
and its user and group are equal to this user and group.GroupPrincipal
group()
Returns this object'sGroupPrincipal
int
hashCode()
Returns a hashcode calculated from the user and groupUserPrincipal
user()
Returns this object'sUserPrincipal
-
Constructor Details
-
UnixDomainPrincipal
Creates a UnixDomainPrincipal.- Parameters:
-
user
- the user identity -
group
- the group identity - Throws:
-
NullPointerException
- ifuser
orgroup
arenull
.
-
-
Method Details
-
equals
Returns true ifobj
is aUnixDomainPrincipal
and its user and group are equal to this user and group.- Overrides:
-
equals
in 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:
-
hashCode
in 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
-