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 Process
getProcess()
Returns the process associated to the emulator, if any.boolean
isAvailable()
Returnstrue
if the emulator associated to this runner is available and can be started.void
start()
Starts the emulator associated to this runner.int
waitFor(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.EmulatorRunner
Returnstrue
if the emulator associated to this runner is available and can be started.- Specified by:
isAvailable
in interfaceBaseEmulatorHelper.EmulatorRunner
-
start
public void start() throws IOException
Description copied from interface:BaseEmulatorHelper.EmulatorRunner
Starts the emulator associated to this runner.- Specified by:
start
in interfaceBaseEmulatorHelper.EmulatorRunner
- Throws:
IOException
-
waitFor
public int waitFor(org.threeten.bp.Duration timeout) throws InterruptedException, TimeoutException
Description copied from interface:BaseEmulatorHelper.EmulatorRunner
Wait for the emulator associated to this runner to terminate, returning the exit status.- Specified by:
waitFor
in interfaceBaseEmulatorHelper.EmulatorRunner
- Throws:
InterruptedException
TimeoutException
-
getProcess
public Process getProcess()
Description copied from interface:BaseEmulatorHelper.EmulatorRunner
Returns the process associated to the emulator, if any.- Specified by:
getProcess
in interfaceBaseEmulatorHelper.EmulatorRunner
-
-