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 设备的 build 变量信息哈希。 |
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 变量信息哈希。
可能的 build 变量键在 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:用于从 GCE 驱动程序读取 JSON 输出的 ERROR(/File) 文件。 |
descriptor |
DeviceDescriptor:需要相应信息的设备的描述符。 |
remoteAdbPort |
int:应用于 adb 连接的远程端口 |
| 返回 | |
|---|---|
GceAvdInfo |
设备的 GceAvdInfo(如果找到),如果出错,则为 null。
|
| 抛出 | |
|---|---|
TargetSetupError |
|
parseGceInfoFromString
public static GceAvdInfo parseGceInfoFromString (String data, DeviceDescriptor descriptor, int remoteAdbPort)
解析给定字符串以获取 GCE AVD 设备信息。
| 参数 | |
|---|---|
data |
String:JSON 字符串。 |
descriptor |
DeviceDescriptor:需要相应信息的设备的描述符。 |
remoteAdbPort |
int:应用于 adb 连接的远程端口 |
| 返回 | |
|---|---|
GceAvdInfo |
设备的 GceAvdInfo(如果找到),如果出错,则为 null。
|
| 抛出 | |
|---|---|
TargetSetupError |
|
toString
public String toString ()
| 返回 | |
|---|---|
String |
|