org.openqa.selenium.server.browserlaunchers
Class AsyncExecute

java.lang.Object
  extended by org.openqa.selenium.server.browserlaunchers.AsyncExecute

public class AsyncExecute
extends java.lang.Object

Spawn a process and return the process handle so you can close it yourself later.

Author:
dfabulich

Nested Class Summary
static class AsyncExecute.ProcessStillAliveException
          Thrown when a process remains alive after attempting to destroy it
 
Constructor Summary
AsyncExecute()
           
 
Method Summary
static int killProcess(java.lang.Process process)
          Forcibly kills a process, using OS tools like "kill" as a last resort
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncExecute

public AsyncExecute()
Method Detail

sleepTightInSeconds

public static void sleepTightInSeconds(long timeoutInSeconds)
Sleeps without explicitly throwing an InterruptedException

Parameters:
timeoutInSeconds - Sleep time in seconds.
Throws:
java.lang.RuntimeException - wrapping an InterruptedException if one gets thrown

sleepTight

public static void sleepTight(long timeout)
Sleeps without explicitly throwing an InterruptedException

Parameters:
timeout - the amout of time to sleep
Throws:
java.lang.RuntimeException - wrapping an InterruptedException if one gets thrown

waitForProcessDeath

public static int waitForProcessDeath(java.lang.Process p,
                                      long timeout)
Waits the specified timeout for the process to die


killProcess

public static int killProcess(java.lang.Process process)
Forcibly kills a process, using OS tools like "kill" as a last resort



Copyright © 2010. All Rights Reserved.