Class BaseEmulatorHelper.DownloadableEmulatorRunner (2.40.0)

protected static class BaseEmulatorHelper.DownloadableEmulatorRunner implements BaseEmulatorHelper.EmulatorRunner

Utility class to start and run an emulator from a download URL.

Inheritance

java.lang.Object > BaseEmulatorHelper.DownloadableEmulatorRunner

Constructors

DownloadableEmulatorRunner(List<String> commandText, URL downloadUrl, String md5CheckSum)

public DownloadableEmulatorRunner(List<String> commandText, URL downloadUrl, String md5CheckSum)
Parameters
Name Description
commandText List<String>
downloadUrl URL
md5CheckSum String

DownloadableEmulatorRunner(List<String> commandText, URL downloadUrl, String md5CheckSum, String accessToken)

public DownloadableEmulatorRunner(List<String> commandText, URL downloadUrl, String md5CheckSum, String accessToken)
Parameters
Name Description
commandText List<String>
downloadUrl URL
md5CheckSum String
accessToken String

Methods

getProcess()

public Process getProcess()

Returns the process associated to the emulator, if any.

Returns
Type Description
Process

isAvailable()

public boolean isAvailable()

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

Returns
Type Description
boolean

start()

public void start()

Starts the emulator associated to this runner.

Exceptions
Type Description
IOException

waitFor(Duration timeout)

public int waitFor(Duration timeout)

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

Parameter
Name Description
timeout org.threeten.bp.Duration
Returns
Type Description
int
Exceptions
Type Description
InterruptedException
TimeoutException