com.atlassian.confluence.it.system
Class LocalProcess

java.lang.Object
  extended by com.atlassian.confluence.it.system.LocalProcess

public final class LocalProcess
extends Object

Represents a local process on a *nix operating system.


Nested Class Summary
static class LocalProcess.Signal
           
 
Constructor Summary
LocalProcess(int processId)
           
 
Method Summary
static boolean isLocalAddress(InetAddress address)
           
static void main(String[] args)
           
 void send(LocalProcess.Signal signal)
           
static LocalProcess serving(URL url)
          Identify a local process via the given URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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)


Copyright © 2003–2015 Atlassian. All rights reserved.