|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.taskdefs.Execute
org.openqa.selenium.server.browserlaunchers.AsyncExecute
public class AsyncExecute
A handy wrapper around Ant's Execute class that can spawn a process and return the process handle so you can close it yourself later
Nested Class Summary | |
---|---|
static class |
AsyncExecute.ProcessStillAliveException
Thrown when a process remains alive after attempting to destroy it |
Field Summary |
---|
Fields inherited from class org.apache.tools.ant.taskdefs.Execute |
---|
INVALID |
Constructor Summary | |
---|---|
AsyncExecute()
|
Method Summary | |
---|---|
java.lang.Process |
asyncSpawn()
Copied from spawn, but actually returns the Process, instead of void |
int |
execute()
|
static boolean |
isAlive(java.lang.Process p)
Is this process still running ? |
static int |
killProcess(java.lang.Process process)
Forcibly kills a process, using OS tools like "kill" as a last resort |
protected void |
setActualExecuteEnvironment()
|
void |
setEnvironmentVariable(java.lang.String name,
java.lang.String value)
|
void |
setLibraryPath(java.lang.String newLibraryPath)
|
static void |
sleepTight(long timeout)
Sleeps without explicitly throwing an InterruptedException |
static void |
sleepTightInSeconds(long timeoutInSeconds)
Sleeps without explicitly throwing an InterruptedException |
static int |
waitForProcessDeath(java.lang.Process p,
long timeout)
Waits the specified timeout for the process to die |
static java.io.File |
whichExec(java.lang.String exec)
Searches the path for the specified executable |
Methods inherited from class org.apache.tools.ant.taskdefs.Execute |
---|
closeStreams, getCommandline, getEnvironment, getExitValue, getProcEnvironment, isFailure, killedProcess, launch, runCommand, setAntRun, setCommandline, setEnvironment, setExitValue, setNewenvironment, setSpawn, setStreamHandler, setVMLauncher, setWorkingDirectory, spawn, toString, waitFor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AsyncExecute()
Method Detail |
---|
public static void sleepTightInSeconds(long timeoutInSeconds)
timeoutInSeconds
- Sleep time in seconds.
java.lang.RuntimeException
- wrapping an InterruptedException if one gets thrownpublic static void sleepTight(long timeout)
timeout
- the amout of time to sleep
java.lang.RuntimeException
- wrapping an InterruptedException if one gets thrownpublic java.lang.Process asyncSpawn() throws java.io.IOException
java.io.IOException
public int execute() throws java.io.IOException
execute
in class org.apache.tools.ant.taskdefs.Execute
java.io.IOException
public static boolean isAlive(java.lang.Process p)
public static int waitForProcessDeath(java.lang.Process p, long timeout)
public static int killProcess(java.lang.Process process)
public static java.io.File whichExec(java.lang.String exec)
exec
- the executable name to search for
public void setLibraryPath(java.lang.String newLibraryPath)
public void setEnvironmentVariable(java.lang.String name, java.lang.String value)
protected void setActualExecuteEnvironment()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |