|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.apache.cxf.common.commands.ForkedCommand
public class ForkedCommand
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static int |
DEFAULT_TIMEOUT
|
static java.lang.String |
EXE_SUFFIX
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
ForkedCommand()
|
|
ForkedCommand(java.lang.String[] args)
|
Method Summary | |
---|---|
int |
execute()
|
int |
execute(int timeout)
Executes the process. |
void |
joinErrOut(boolean flag)
Determines if the threads collecting the forked process' stdout/stderr should be joined. |
void |
run()
Implements the run method for the thread on which the process is executed. |
protected void |
setArgs(java.lang.String[] args)
|
void |
setEnvironment(java.lang.String[] env)
|
void |
setErrorStream(java.io.PrintStream es)
|
void |
setOutputStream(java.io.PrintStream os)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, 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, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String EXE_SUFFIX
public static final int DEFAULT_TIMEOUT
Constructor Detail |
---|
public ForkedCommand()
public ForkedCommand(java.lang.String[] args)
Method Detail |
---|
protected void setArgs(java.lang.String[] args)
public void setEnvironment(java.lang.String[] env)
public java.lang.String toString()
toString
in class java.lang.Thread
public void joinErrOut(boolean flag)
flag
- boolean indicating if threads should be joinedpublic int execute()
public int execute(int timeout)
timeout
- the timeout in seconds
ForkedCommandException
- if process execution fails for some reason
or if the timeout has expired and the process was killedpublic void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void setOutputStream(java.io.PrintStream os)
public void setErrorStream(java.io.PrintStream es)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |