Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
Forker(ProcessBuilder pb) |
Modifier and Type | Method and Description |
---|---|
protected void |
copyFromSudo(String header,
InputStream sudoStream) |
static void |
init(String[] args)
Initialization code, which runs before the main loop starts processing.
|
protected void |
interactWithSudo(OutputStream os) |
static void |
main(String... args)
The main code for this class, which turns this into an executable
program.
|
static boolean |
mainLoopBody(String[] args)
The body of the main loop of this program.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public Forker(ProcessBuilder pb) throws IOException
IOException
public static void init(String[] args) throws Exception
args
- The arguments to the program.Exception
- If anything goes wrong.public static boolean mainLoopBody(String[] args) throws Exception
args
- The arguments to use when running the other program.Exception
- If anything goes wrong. Note that the loop is repeated if an
exception occurs in it.public static void main(String... args)
args
- Arguments to this program.protected void interactWithSudo(OutputStream os) throws Exception
Exception
protected void copyFromSudo(String header, InputStream sudoStream) throws Exception
Exception
Copyright © 2015–2018 The Apache Software Foundation. All rights reserved.