GceAvdInfo
public
class
GceAvdInfo
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.device.cloud.GceAvdInfo |
Cấu trúc lưu giữ dữ liệu liên quan cho một phiên bản AVD nhất định trên GCE.
Tóm tắt
Lớp lồng ghép | |
|---|---|
class |
GceAvdInfo.LogFileEntry
|
Trường | |
|---|---|
public
static
final
List<String> |
BUILD_VARS
|
Hàm khởi tạo công khai | |
|---|---|
GceAvdInfo(String instanceName, HostAndPort hostAndPort)
|
|
GceAvdInfo(String instanceName, HostAndPort hostAndPort, ErrorIdentifier errorType, String errors, GceAvdInfo.GceStatus status)
|
|
Phương thức công khai | |
|---|---|
HashMap<String, String>
|
getBuildVars()
Trả về hàm băm thông tin biến bản dựng của thiết bị AVD GCE. |
Integer
|
getDeviceOffset()
|
ErrorIdentifier
|
getErrorType()
|
String
|
getErrors()
|
String
|
getInstanceUser()
|
List<GceAvdInfo.LogFileEntry>
|
getLogs()
Trả về bản đồ từ các đường dẫn nhật ký cục bộ hoặc từ xa đến các loại. |
String
|
getOxygenationDeviceId()
|
boolean
|
getSkipDeviceLogCollection()
|
GceAvdInfo.GceStatus
|
getStatus()
|
HostAndPort
|
hostAndPort()
|
String
|
instanceName()
|
boolean
|
isIpPreconfigured()
|
static
GceAvdInfo
|
parseGceInfoFromFile(File f, DeviceDescriptor descriptor, int remoteAdbPort)
Phân tích một tệp nhất định để lấy thông tin thiết bị AVD GCE. |
static
List<GceAvdInfo>
|
parseGceInfoFromOxygenClientOutput(CommandResult oxygenRes, TestDeviceOptions deviceOptions)
Phân tích cú pháp một đầu ra dòng lệnh nhất định từ tệp nhị phân của ứng dụng Oxygen để lấy thông tin về AVD được thuê. |
static
GceAvdInfo
|
parseGceInfoFromString(String data, DeviceDescriptor descriptor, int remoteAdbPort)
Phân tích một chuỗi nhất định để lấy thông tin thiết bị AVD GCE. |
void
|
setDeviceOffset(Integer deviceOffset)
|
void
|
setErrorType(ErrorIdentifier errorType)
|
void
|
setErrors(String errors)
|
void
|
setInstanceUser(String instanceUser)
|
void
|
setIpPreconfigured(boolean isIpPreconfigured)
|
void
|
setOxygenationDeviceId(String deviceId)
|
void
|
setSkipBugreportCollection(boolean skipDeviceLogCollection)
|
void
|
setSkipDeviceLogCollection(boolean skipDeviceLogCollection)
|
void
|
setStatus(GceAvdInfo.GceStatus status)
|
String
|
toString()
|
Trường
BUILD_VARS
public static final List<String> BUILD_VARS
Hàm khởi tạo công khai
GceAvdInfo
public GceAvdInfo (String instanceName,
HostAndPort hostAndPort)| Tham số | |
|---|---|
instanceName |
String |
hostAndPort |
HostAndPort |
GceAvdInfo
public GceAvdInfo (String instanceName,
HostAndPort hostAndPort,
ErrorIdentifier errorType,
String errors,
GceAvdInfo.GceStatus status)| Tham số | |
|---|---|
instanceName |
String |
hostAndPort |
HostAndPort |
errorType |
ErrorIdentifier |
errors |
String |
status |
GceAvdInfo.GceStatus |
Phương thức công khai
getBuildVars
public HashMap<String, String> getBuildVars ()
Trả về hàm băm thông tin biến bản dựng của thiết bị AVD GCE.
Các khoá biến bản dựng có thể có được mô tả trong BUILD_VARS, ví dụ: 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.
| Giá trị trả về | |
|---|---|
HashMap<String, String> |
|
getDeviceOffset
public Integer getDeviceOffset ()
| Giá trị trả về | |
|---|---|
Integer |
|
getErrors
public String getErrors ()
| Giá trị trả về | |
|---|---|
String |
|
getInstanceUser
public String getInstanceUser ()
| Giá trị trả về | |
|---|---|
String |
|
getLogs
public List<GceAvdInfo.LogFileEntry> getLogs ()
Trả về bản đồ từ các đường dẫn nhật ký cục bộ hoặc từ xa đến các loại.
| Giá trị trả về | |
|---|---|
List<GceAvdInfo.LogFileEntry> |
|
getOxygenationDeviceId
public String getOxygenationDeviceId ()
| Giá trị trả về | |
|---|---|
String |
|
getSkipDeviceLogCollection
public boolean getSkipDeviceLogCollection ()
| Giá trị trả về | |
|---|---|
boolean |
|
hostAndPort
public HostAndPort hostAndPort ()
| Giá trị trả về | |
|---|---|
HostAndPort |
|
instanceName
public String instanceName ()
| Giá trị trả về | |
|---|---|
String |
|
isIpPreconfigured
public boolean isIpPreconfigured ()
| Giá trị trả về | |
|---|---|
boolean |
|
parseGceInfoFromFile
public static GceAvdInfo parseGceInfoFromFile (File f, DeviceDescriptor descriptor, int remoteAdbPort)
Phân tích một tệp nhất định để lấy thông tin thiết bị AVD GCE.
| Tham số | |
|---|---|
f |
File: Tệp File để đọc đầu ra JSON từ Trình điều khiển GCE. |
descriptor |
DeviceDescriptor: bộ mô tả của thiết bị cần thông tin. |
remoteAdbPort |
int: cổng từ xa cần được dùng cho kết nối adb |
| Giá trị trả về | |
|---|---|
GceAvdInfo |
GceAvdInfo của thiết bị (nếu tìm thấy) hoặc giá trị rỗng nếu có lỗi. |
| Gửi | |
|---|---|
TargetSetupError |
|
parseGceInfoFromOxygenClientOutput
public static List<GceAvdInfo> parseGceInfoFromOxygenClientOutput (CommandResult oxygenRes, TestDeviceOptions deviceOptions)
Phân tích cú pháp một đầu ra dòng lệnh nhất định từ tệp nhị phân của ứng dụng Oxygen để lấy thông tin về AVD được thuê.
| Tham số | |
|---|---|
oxygenRes |
CommandResult: CommandResult từ quá trình thực thi lệnh của ứng dụng Oxygen. |
deviceOptions |
TestDeviceOptions: TestDeviceOptions mô tả các lựa chọn của thiết bị |
| Giá trị trả về | |
|---|---|
List<GceAvdInfo> |
Đã cho thuê thành công List thiết bị. Sẽ gửi TargetSetupError nếu không thuê được thiết bị. |
| Gửi | |
|---|---|
TargetSetupError |
|
parseGceInfoFromString
public static GceAvdInfo parseGceInfoFromString (String data, DeviceDescriptor descriptor, int remoteAdbPort)
Phân tích một chuỗi nhất định để lấy thông tin thiết bị AVD GCE.
| Tham số | |
|---|---|
data |
String: Chuỗi JSON. |
descriptor |
DeviceDescriptor: bộ mô tả của thiết bị cần thông tin. |
remoteAdbPort |
int: cổng từ xa cần được dùng cho kết nối adb |
| Giá trị trả về | |
|---|---|
GceAvdInfo |
GceAvdInfo của thiết bị (nếu tìm thấy) hoặc giá trị rỗng nếu có lỗi. |
| Gửi | |
|---|---|
TargetSetupError |
|
setDeviceOffset
public void setDeviceOffset (Integer deviceOffset)
| Tham số | |
|---|---|
deviceOffset |
Integer |
setErrors
public void setErrors (String errors)
| Tham số | |
|---|---|
errors |
String |
setInstanceUser
public void setInstanceUser (String instanceUser)
| Tham số | |
|---|---|
instanceUser |
String |
setIpPreconfigured
public void setIpPreconfigured (boolean isIpPreconfigured)
| Tham số | |
|---|---|
isIpPreconfigured |
boolean |
setOxygenationDeviceId
public void setOxygenationDeviceId (String deviceId)
| Tham số | |
|---|---|
deviceId |
String |
setSkipBugreportCollection
public void setSkipBugreportCollection (boolean skipDeviceLogCollection)
| Tham số | |
|---|---|
skipDeviceLogCollection |
boolean |
setSkipDeviceLogCollection
public void setSkipDeviceLogCollection (boolean skipDeviceLogCollection)
| Tham số | |
|---|---|
skipDeviceLogCollection |
boolean |
toString
public String toString ()
| Giá trị trả về | |
|---|---|
String |
|