Class LocalProcess


  • public final class LocalProcess
    extends Object
    Represents a local process on a *nix operating system.
    • Constructor Detail

      • LocalProcess

        public LocalProcess​(int processId)
    • Method Detail

      • main

        public static void main​(String[] args)
      • serving

        public static LocalProcess serving​(URL url)
        Identify a local process via the given URL.

        The URL has to resolve to the localhost and the protocol has to be mappable to a known port if no port is set.

        Assumes that the lsof (list open files) command is installed.

        Parameters:
        url - the URL served from the localhost in order to identify the serving process
        Returns:
        the serving process
      • send

        public void send​(LocalProcess.Signal signal)
        Parameters:
        signal - the POSIX signal to be send to the process
      • isLocalAddress

        public static boolean isLocalAddress​(InetAddress address)