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 thực thể AVD GCE nhất định.

Tóm tắt

Lớp lồng ghép

enum GceAvdInfo.GceStatus

 

Trường

public static final 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

getBuildVars()

Trả về hàm băm thông tin biến bản dựng của thiết bị AVD GCE.

ErrorIdentifier getErrorType()
String getErrors()
GceAvdInfo.GceStatus getStatus()
HostAndPort hostAndPort()
String instanceName()
static GceAvdInfo parseGceInfoFromFile(File f, DeviceDescriptor descriptor, int remoteAdbPort)

Phân tích cú pháp một tệp nhất định để lấy thông tin thiết bị AVD GCE.

static GceAvdInfo parseGceInfoFromString(String data, DeviceDescriptor descriptor, int remoteAdbPort)

Phân tích cú pháp một chuỗi nhất định để lấy thông tin thiết bị AVD GCE.

void setStatus(GceAvdInfo.GceStatus status)
String toString()

Trường

BUILD_VARS

public static final  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  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ề

getErrorType

public ErrorIdentifier getErrorType ()

Giá trị trả về
ErrorIdentifier

getErrors

public String getErrors ()

Giá trị trả về
String

getStatus

public GceAvdInfo.GceStatus getStatus ()

Giá trị trả về
GceAvdInfo.GceStatus

hostAndPort

public HostAndPort hostAndPort ()

Giá trị trả về
HostAndPort

instanceName

public String instanceName ()

Giá trị trả về
String

parseGceInfoFromFile

public static GceAvdInfo parseGceInfoFromFile (File f, 
                DeviceDescriptor descriptor, 
                int remoteAdbPort)

Phân tích cú pháp một tệp nhất định để lấy thông tin thiết bị AVD GCE.

Tham số
f File: Tệp ERROR(/File) để đọc đầu ra JSON từ Trình điều khiển GCE.

descriptor DeviceDescriptor: chỉ số mô tả của thiết bị cần thông tin.

remoteAdbPort int: cổng từ xa cần dùng để kết nối adb

Giá trị trả về
GceAvdInfo GceAvdInfo của thiết bị nếu tìm thấy hoặc rỗng nếu có lỗi.

Gửi
TargetSetupError

parseGceInfoFromString

public static GceAvdInfo parseGceInfoFromString (String data, 
                DeviceDescriptor descriptor, 
                int remoteAdbPort)

Phân tích cú pháp 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: chỉ số mô tả của thiết bị cần thông tin.

remoteAdbPort int: cổng từ xa cần dùng để kết nối adb

Giá trị trả về
GceAvdInfo GceAvdInfo của thiết bị nếu tìm thấy hoặc rỗng nếu có lỗi.

Gửi
TargetSetupError

setStatus

public void setStatus (GceAvdInfo.GceStatus status)

Tham số
status GceAvdInfo.GceStatus

toString

public String toString ()

Giá trị trả về
String