Package com.google.cloud.testing
Class BaseEmulatorHelper.DownloadableEmulatorRunner
- java.lang.Object
-
- com.google.cloud.testing.BaseEmulatorHelper.DownloadableEmulatorRunner
-
- All Implemented Interfaces:
BaseEmulatorHelper.EmulatorRunner
- Enclosing class:
- BaseEmulatorHelper<T extends ServiceOptions>
protected static class BaseEmulatorHelper.DownloadableEmulatorRunner extends Object implements BaseEmulatorHelper.EmulatorRunner
Utility class to start and run an emulator from a download URL.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProcessgetProcess()Returns the process associated to the emulator, if any.booleanisAvailable()Returnstrueif the emulator associated to this runner is available and can be started.voidstart()Starts the emulator associated to this runner.intwaitFor(org.threeten.bp.Duration timeout)Wait for the emulator associated to this runner to terminate, returning the exit status.
-
-
-
Method Detail
-
isAvailable
public boolean isAvailable()
Description copied from interface:BaseEmulatorHelper.EmulatorRunnerReturnstrueif the emulator associated to this runner is available and can be started.- Specified by:
isAvailablein interfaceBaseEmulatorHelper.EmulatorRunner
-
start
public void start() throws IOExceptionDescription copied from interface:BaseEmulatorHelper.EmulatorRunnerStarts the emulator associated to this runner.- Specified by:
startin interfaceBaseEmulatorHelper.EmulatorRunner- Throws:
IOException
-
waitFor
public int waitFor(org.threeten.bp.Duration timeout) throws InterruptedException, TimeoutExceptionDescription copied from interface:BaseEmulatorHelper.EmulatorRunnerWait for the emulator associated to this runner to terminate, returning the exit status.- Specified by:
waitForin interfaceBaseEmulatorHelper.EmulatorRunner- Throws:
InterruptedExceptionTimeoutException
-
getProcess
public Process getProcess()
Description copied from interface:BaseEmulatorHelper.EmulatorRunnerReturns the process associated to the emulator, if any.- Specified by:
getProcessin interfaceBaseEmulatorHelper.EmulatorRunner
-
-