- java.lang.Object
-
- jnr.unixsocket.Credentials
-
public final class Credentials extends Object
This class represents the peer credentials, retrievable from an AF_UNIX socket.An instance of this class can be retrieved, using either the socket-level methods
UnixSocket.getCredentials()
andUnixDatagramSocket.getCredentials()
or by specifyingUnixSocketOptions.SO_PEERCRED
as argument to one of the channel-level methodsUnixSocketChannel.getOption(java.net.SocketOption<T>)
andUnixDatagramChannel.getOption(java.net.SocketOption<T>)
.See also: socket (7)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getGid()
Retrieves the peer's numeric effective group ID.int
getPid()
Retrieves the peer's process ID.int
getUid()
Retrieves the peer's numeric effective user ID.String
toString()
Returns a human readable description of this instance.
-