PageRenderTime 16ms CodeModel.GetById 13ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/hudson-core/src/main/java/hudson/util/ProcessTreeRemoting.java

http://github.com/hudson/hudson
Java | 32 lines | 21 code | 4 blank | 7 comment | 0 complexity | add4cc43da0144b2fe1ac216eb7edab4 MD5 | raw file
 1package hudson.util;
 2
 3import hudson.EnvVars;
 4import hudson.util.ProcessTree.ProcessCallable;
 5
 6import java.io.IOException;
 7import java.lang.reflect.Proxy;
 8import java.util.List;
 9import java.util.Map;
10
11/**
12 * Remoting interfaces of {@link ProcessTree}.
13 *
14 * These classes need to be public due to the way {@link Proxy} works.
15 *
16 * @author Kohsuke Kawaguchi
17 */
18public class ProcessTreeRemoting {
19    public interface IProcessTree {
20        void killAll(Map<String, String> modelEnvVars) throws InterruptedException;
21    }
22
23    public interface IOSProcess {
24        int getPid();
25        IOSProcess getParent();
26        void kill() throws InterruptedException;
27        void killRecursively() throws InterruptedException;
28        List<String> getArguments();
29        EnvVars getEnvironmentVariables();
30        <T> T act(ProcessCallable<T> callable) throws IOException, InterruptedException;
31    }
32}