託管遠程設備

public class ManagedRemoteDevice
extends TestDevice implements ITestLoggerReceiver

對象
com.android.tradefed.device.NativeDevice
com.android.tradefed.device.TestDevice
com.android.tradefed.device.cloud.ManagedRemoteDevice


在我們通過虛擬機內的 Tradefed 實例遠程管理的虛擬機內運行的設備。

概括

公共構造函數

ManagedRemoteDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)

創建ManagedRemoteDevice

公共方法

TestDeviceOptions getOptions ()

在嘗試進行遠程設置之前,覆蓋基本 getter 以能夠解析動態選項。

GceAvdInfo getRemoteAvdInfo ()

返回GceAvdInfo描述遠程實例。

void postInvocationTearDown (Throwable exception)

void preInvocationSetup (IBuildInfo info, MultiMap<String, String> attributes)

void setTestLogger (ITestLogger testLogger)

受保護的方法

long getCurrentTime ()

返回當前系統時間。

void launchGce ()

根據構建信息啟動實際的 gce 設備。

公共構造函數

託管遠程設備

public ManagedRemoteDevice (IDevice device, 
                IDeviceStateMonitor stateMonitor, 
                IDeviceMonitor allocationMonitor)

創建ManagedRemoteDevice

參數
device IDevice :相關IDevice

stateMonitor IDeviceStateMonitor :在IDeviceStateMonitor機制使用

allocationMonitor IDeviceMonitor :在IDeviceMonitor通知的分配狀態的變化。

公共方法

獲取選項

public TestDeviceOptions getOptions ()

在嘗試進行遠程設置之前,覆蓋基本 getter 以能夠解析動態選項。

退貨
TestDeviceOptions

獲取遠程信息

public GceAvdInfo getRemoteAvdInfo ()

返回GceAvdInfo描述遠程實例。

退貨
GceAvdInfo

調用後拆解

public void postInvocationTearDown (Throwable exception)

參數
exception Throwable

調用前設置

public void preInvocationSetup (IBuildInfo info, 
                MultiMap<String, String> attributes)

參數
info IBuildInfo

attributes MultiMap

投擲
DeviceNotAvailableException
TargetSetupError

設置測試記錄器

public void setTestLogger (ITestLogger testLogger)

參數
testLogger ITestLogger

受保護的方法

獲取當前時間

protected long getCurrentTime ()

返回當前系統時間。暴露用於測試。

退貨
long

啟動Gce

protected void launchGce ()

根據構建信息啟動實際的 gce 設備。

投擲
TargetSetupError