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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the process associated to the emulator, if any.booleanReturnstrueif 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.
-
Constructor Details
-
DownloadableEmulatorRunner
-
DownloadableEmulatorRunner
-
-
Method Details
-
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
Description copied from interface:BaseEmulatorHelper.EmulatorRunnerStarts the emulator associated to this runner.- Specified by:
startin interfaceBaseEmulatorHelper.EmulatorRunner- Throws:
IOException
-
waitFor
Description 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
Description copied from interface:BaseEmulatorHelper.EmulatorRunnerReturns the process associated to the emulator, if any.- Specified by:
getProcessin interfaceBaseEmulatorHelper.EmulatorRunner
-