Class BaseEmulatorHelper.GcloudEmulatorRunner (2.8.9)

protected static class BaseEmulatorHelper.GcloudEmulatorRunner implements BaseEmulatorHelper.EmulatorRunner

Utility class to start and run an emulator from the Google Cloud SDK.

Inheritance

java.lang.Object > BaseEmulatorHelper.GcloudEmulatorRunner

Constructors

GcloudEmulatorRunner(List<String> commandText, String versionPrefix, String minVersion)

public GcloudEmulatorRunner(List<String> commandText, String versionPrefix, String minVersion)
Parameters
NameDescription
commandTextList<String>
versionPrefixString
minVersionString

Methods

getProcess()

public Process getProcess()

Returns the process associated to the emulator, if any.

Returns
TypeDescription
Process

isAvailable()

public boolean isAvailable()

Returns true if the emulator associated to this runner is available and can be started.

Returns
TypeDescription
boolean

start()

public void start()

Starts the emulator associated to this runner.

Exceptions
TypeDescription
IOException

waitFor(Duration timeout)

public int waitFor(Duration timeout)

Wait for the emulator associated to this runner to terminate, returning the exit status.

Parameter
NameDescription
timeoutorg.threeten.bp.Duration
Returns
TypeDescription
int
Exceptions
TypeDescription
InterruptedException
TimeoutException