|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eodisp.util.launcher.ProcessImpl
public class ProcessImpl
| Field Summary | |
|---|---|
(package private) static org.apache.log4j.Logger |
logger
Log4J logger for this class |
| Constructor Summary | |
|---|---|
ProcessImpl(org.apache.tools.ant.types.Commandline commandline)
|
|
ProcessImpl(org.apache.tools.ant.types.Commandline commandline,
java.io.File workingDir)
|
|
ProcessImpl(org.apache.tools.ant.types.CommandlineJava commandlineJava)
|
|
ProcessImpl(org.apache.tools.ant.types.CommandlineJava commandlineJava,
java.io.File workingdir)
|
|
| Method Summary | |
|---|---|
void |
addEnvVar(java.lang.String key,
java.lang.String value)
Adds the environment variable with the given key and value |
void |
addListener(ProcessListener processListener)
Add a listener to this process to get notified of state changes. |
void |
addOutputStream(java.io.OutputStream stream)
|
java.lang.String |
getClassname()
|
boolean |
kill(long timeoutInMillis)
Forcibly kills this process. |
void |
launch()
Launches the process and returns immediately. |
int |
launchBlocking()
Launches the process and block until the process terminates or the thread is being interrupted. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
static org.apache.log4j.Logger logger
| Constructor Detail |
|---|
public ProcessImpl(org.apache.tools.ant.types.CommandlineJava commandlineJava)
public ProcessImpl(org.apache.tools.ant.types.CommandlineJava commandlineJava,
java.io.File workingdir)
public ProcessImpl(org.apache.tools.ant.types.Commandline commandline)
public ProcessImpl(org.apache.tools.ant.types.Commandline commandline,
java.io.File workingDir)
| Method Detail |
|---|
public void addEnvVar(java.lang.String key,
java.lang.String value)
Process
addEnvVar in interface Processkey - the key of the environment variablevalue - the value of the environment variablepublic boolean kill(long timeoutInMillis)
true if
this process has been started and is not running anymore (for whatever
reason). Returns false if Process.launch() has not been
invoked. If this method returns true, it must return
true for all subsequent calls to this method. If this
method returns false it means that the process is probably
still running.
kill in interface ProcesstimeoutInMillis - wait at most timeoutInMillis to try to kill the
process. A value of 0 means to wait forever.
true if the process has been stopped,
false if the process is still running or has never
been started.
public void launch()
throws java.io.IOException
launch in interface Processjava.io.IOException - thrown if this process could not be launched.
public int launchBlocking()
throws java.io.IOException
launchBlocking in interface Processjava.io.IOExceptionpublic void addListener(ProcessListener processListener)
addListener in interface Processpublic java.lang.String getClassname()
public java.lang.String toString()
toString in class java.lang.Object
public void addOutputStream(java.io.OutputStream stream)
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||