Class PeerCredentials


  • @UnstableApi
    public final class PeerCredentials
    extends java.lang.Object
    User credentials discovered for the peer unix domain socket. The PID, UID and GID of the user connected on the other side of the unix domain socket For details see: SO_PEERCRED
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int[] gids  
      private int pid  
      private int uid  
    • Constructor Summary

      Constructors 
      Constructor Description
      PeerCredentials​(int p, int u, int... gids)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int[] gids()  
      int pid()
      Get the PID of the peer process.
      java.lang.String toString()  
      int uid()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • pid

        private final int pid
      • uid

        private final int uid
      • gids

        private final int[] gids
    • Constructor Detail

      • PeerCredentials

        PeerCredentials​(int p,
                        int u,
                        int... gids)
    • Method Detail

      • pid

        public int pid()
        Get the PID of the peer process.

        This is currently not populated on MacOS and BSD based systems.

        Returns:
        The PID of the peer process.
      • uid

        public int uid()
      • gids

        public int[] gids()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object