/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

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