GceAvdInfo
public
class
GceAvdInfo
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.device.cloud.GceAvdInfo |
結構體,用於儲存特定 GCE AVD 執行個體的相關資料。
摘要
巢狀類別 | |
|---|---|
enum |
GceAvdInfo.GceStatus
|
欄位 | |
|---|---|
public
static
final
|
BUILD_VARS
|
公用建構函式 | |
|---|---|
GceAvdInfo(String instanceName, HostAndPort hostAndPort)
|
|
GceAvdInfo(String instanceName, HostAndPort hostAndPort, ErrorIdentifier errorType, String errors, GceAvdInfo.GceStatus status)
|
|
公用方法 | |
|---|---|
|
getBuildVars()
傳回 GCE AVD 裝置的建構變數資訊雜湊。 |
ErrorIdentifier
|
getErrorType()
|
String
|
getErrors()
|
GceAvdInfo.GceStatus
|
getStatus()
|
HostAndPort
|
hostAndPort()
|
String
|
instanceName()
|
static
GceAvdInfo
|
parseGceInfoFromFile(File f, DeviceDescriptor descriptor, int remoteAdbPort)
剖析指定檔案,取得 GCE AVD 裝置資訊。 |
static
GceAvdInfo
|
parseGceInfoFromString(String data, DeviceDescriptor descriptor, int remoteAdbPort)
剖析指定字串,取得 GCE AVD 裝置資訊。 |
void
|
setStatus(GceAvdInfo.GceStatus status)
|
String
|
toString()
|
欄位
BUILD_VARS
public static finalBUILD_VARS
公用建構函式
GceAvdInfo
public GceAvdInfo (String instanceName,
HostAndPort hostAndPort)| 參數 | |
|---|---|
instanceName |
String |
hostAndPort |
HostAndPort |
GceAvdInfo
public GceAvdInfo (String instanceName,
HostAndPort hostAndPort,
ErrorIdentifier errorType,
String errors,
GceAvdInfo.GceStatus status)| 參數 | |
|---|---|
instanceName |
String |
hostAndPort |
HostAndPort |
errorType |
ErrorIdentifier |
errors |
String |
status |
GceAvdInfo.GceStatus |
公用方法
getBuildVars
publicgetBuildVars ()
傳回 GCE AVD 裝置的建構變數資訊雜湊。
可能的建構變數鍵會在 BUILD_VARS 中說明,例如:build_id、build_target、branch、kernel_build_id、kernel_build_target、kernel_branch、system_build_id、system_build_target、system_branch、emulator_build_id、emulator_build_target、emulator_branch。
| 傳回 | |
|---|---|
|
|
getErrorType
public ErrorIdentifier getErrorType ()
| 傳回 | |
|---|---|
ErrorIdentifier |
|
getErrors
public String getErrors ()
| 傳回 | |
|---|---|
String |
|
hostAndPort
public HostAndPort hostAndPort ()
| 傳回 | |
|---|---|
HostAndPort |
|
instanceName
public String instanceName ()
| 傳回 | |
|---|---|
String |
|
parseGceInfoFromFile
public static GceAvdInfo parseGceInfoFromFile (File f, DeviceDescriptor descriptor, int remoteAdbPort)
剖析指定檔案,取得 GCE AVD 裝置資訊。
| 參數 | |
|---|---|
f |
File:ERROR(/File) 檔案,用於讀取 GCE Driver 的 JSON 輸出內容。 |
descriptor |
DeviceDescriptor:需要資訊的裝置描述項。 |
remoteAdbPort |
int:應用於 ADB 連線的遠端通訊埠 |
| 傳回 | |
|---|---|
GceAvdInfo |
找到裝置時,會傳回裝置的 GceAvdInfo;如果發生錯誤,則傳回空值。 |
| 擲回 | |
|---|---|
TargetSetupError |
|
parseGceInfoFromString
public static GceAvdInfo parseGceInfoFromString (String data, DeviceDescriptor descriptor, int remoteAdbPort)
剖析指定字串,取得 GCE AVD 裝置資訊。
| 參數 | |
|---|---|
data |
String:JSON 字串。 |
descriptor |
DeviceDescriptor:需要資訊的裝置描述項。 |
remoteAdbPort |
int:應用於 ADB 連線的遠端通訊埠 |
| 傳回 | |
|---|---|
GceAvdInfo |
找到裝置時會傳回裝置的 GceAvdInfo,如果發生錯誤則傳回空值。 |
| 擲回 | |
|---|---|
TargetSetupError |
|
toString
public String toString ()
| 傳回 | |
|---|---|
String |
|