|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
org.openmdx.kernel.application.process.Subprocess
public class Subprocess
Subprocess
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
static Integer |
SUCCESS
The exit and run value for success. |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
Subprocess(Process process,
Character notification)
Deprecated. in favour of the constructor including an explicit output and exception stream. |
|
Subprocess(Process process,
Character notification,
OutputStream outputStream,
OutputStream errorStream)
Constructor |
|
| Method Summary | |
|---|---|
void |
destroy()
Kills the subprocess |
Integer |
exitValue()
Retrieve the subprocess' exit value. |
static Subprocess |
fork(String jre,
String classpath,
String[] options,
Map properties,
String className,
String[] arguments,
Character synchronization)
Deprecated. in favour of the fork method including an explicit output and exception stream. |
static Subprocess |
fork(String jre,
String classpath,
String[] options,
Map properties,
String className,
String[] arguments,
Character synchronization,
OutputStream outputStream,
OutputStream exceptionStream)
Fork a Java process |
void |
run()
|
Integer |
runValue()
Tells whether the sub-process is active and has notified the launcher via it's exception stream. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, 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, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Integer SUCCESS
| Constructor Detail |
|---|
public Subprocess(Process process,
Character notification,
OutputStream outputStream,
OutputStream errorStream)
process - notification - The signal character or nulloutputStream - The stream obtains data piped from the standard output stream
of the process represented by this Subprocess
object; or null to discard the data.exceptionStream - The stream obtains data piped from the error output stream of
the process represented by this Subprocess
object; or null to discard the data.
public Subprocess(Process process,
Character notification)
process - notification - The signal character or null| Method Detail |
|---|
public static Subprocess fork(String jre,
String classpath,
String[] options,
Map properties,
String className,
String[] arguments,
Character synchronization,
OutputStream outputStream,
OutputStream exceptionStream)
throws IOException,
InterruptedException
jre - the JRE directory.
Optional, defaults to the "java.home" system property.classpath - the class-path.
Optional, defaults to the "java.class.path" system property.options - additional Java VM Options.
Optional.properties - the system properties to be set.
Optional, defaults to "org.openmdx.rmi.naming.service" and
"org.openmdx.rmi.registry.port" retrieved from
Contexts.arguments - Program argumentssynchronization - Fork waits until the subprocess has terminated or the
synchronization character has been sent either to the
subprocess' error or output stream unless synchronization is
null.outputStream - The stream obtains data piped from the standard output stream
of the process represented by this Subprocess
object; or null to discard the data.exceptionStream - The stream obtains data piped from the error output stream of
the process represented by this Subprocess
object; or null to discard the data.
IOException
InterruptedException
public static Subprocess fork(String jre,
String classpath,
String[] options,
Map properties,
String className,
String[] arguments,
Character synchronization)
throws IOException,
InterruptedException
jre - the JRE directory.
Optional, defaults to the "java.home" system property.classpath - the class-path.
Optional, defaults to the "java.class.path" system property.options - additional Java VM Options.
Optional.properties - the system properties to be set.
Optional, defaults to "org.openmdx.rmi.naming.service" and
"org.openmdx.rmi.registry.port" retrieved from
Contexts.arguments - Program argumentssynchronization - Fork waits until the subprocess has terminated or the
synchronization character has been sent either to the
subprocess' error or output stream unless synchronization is
null.
IOException
InterruptedExceptionpublic void run()
run in interface Runnablerun in class Threadpublic Integer exitValue()
public Integer runValue()
null or the current thread is interruptedpublic void destroy()
destroy in class Thread
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||