OxygenClient
public
class
OxygenClient
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.device.cloud.OxygenClient |
คลาสที่จัดการการใช้ไบนารีไคลเอ็นต์ของ Oxygen เพื่อเช่าหรือปล่อยอุปกรณ์ Oxygen
สรุป
ช่อง | |
|---|---|
public
static
final
|
sGceDeviceParamsToOxygenMap
|
ตัวสร้างแบบสาธารณะ | |
|---|---|
OxygenClient(File clientBinary, IRunUtil runUtil)
|
|
OxygenClient(File clientBinary)
ตัวสร้างคลาส OxygenClient |
|
เมธอดสาธารณะ | |
|---|---|
void
|
closeLHPConnection(Process p)
ปิดการเชื่อมต่อกับอุปกรณ์ช่วยหายใจระยะไกลด้วย |
Integer
|
createServerSocket()
ตัวช่วยสร้างซ็อกเก็ตเซิร์ฟเวอร์ที่ไม่ได้ใช้ |
Process
|
createTunnelViaLHP(OxygenClient.LHPTunnelMode mode, String portNumber, String instanceName, String deviceId)
สร้างอุโมงค์ adb หรือ ssh ไปยังชื่ออินสแตนซ์ที่ระบุ และกำหนดปลายทางให้กับอุปกรณ์ผ่าน LHP ตามโหมดอุโมงค์ที่ระบุ |
String
|
getOverrideCvdPath(TestDeviceOptions deviceOptions)
แสดงผลค่าของอาร์กิวเมนต์ "override_cvd_path" ใน TestDeviceOptions ที่ระบุ |
CommandResult
|
leaseDevice(IBuildInfo b, TestDeviceOptions deviceOptions, MultiMap<String, String> attributes)
พยายามเช่าอุปกรณ์โดยการเรียกไบนารีไคลเอ็นต์ Oxygen |
CommandResult
|
leaseMultipleDevices(
พยายามเช่าอุปกรณ์หลายเครื่องโดยการเรียกไบนารีไคลเอ็นต์ Oxygen |
Boolean
|
noWaitForBootSpecified(TestDeviceOptions deviceOptions)
ตรวจสอบว่าได้ระบุ no_wait_for_boot ในคำขอเช่า Oxygen หรือไม่ |
boolean
|
release(GceAvdInfo gceAvdInfo, TestDeviceOptions deviceOptions)
พยายามปล่อยอุปกรณ์โดยใช้ไบนารีไคลเอ็นต์ Oxygen |
ช่อง
sGceDeviceParamsToOxygenMap
public static finalsGceDeviceParamsToOxygenMap
ตัวสร้างแบบสาธารณะ
OxygenClient
public OxygenClient (File clientBinary,
IRunUtil runUtil)| พารามิเตอร์ | |
|---|---|
clientBinary |
File |
runUtil |
IRunUtil |
OxygenClient
public OxygenClient (File clientBinary)
ตัวสร้างคลาส OxygenClient
| พารามิเตอร์ | |
|---|---|
clientBinary |
File: ไฟล์ไบนารีของไคลเอ็นต์ Oxygen ที่เรียกใช้ได้ |
เมธอดสาธารณะ
closeLHPConnection
public void closeLHPConnection (Process p)
ปิดการเชื่อมต่อกับอุปกรณ์ช่วยหายใจระยะไกลด้วย Process ที่ระบุ
| พารามิเตอร์ | |
|---|---|
p |
Process |
createServerSocket
public Integer createServerSocket ()
ตัวช่วยสร้างซ็อกเก็ตเซิร์ฟเวอร์ที่ไม่ได้ใช้
| คิกรีเทิร์น | |
|---|---|
Integer |
|
createTunnelViaLHP
public Process createTunnelViaLHP (OxygenClient.LHPTunnelMode mode, String portNumber, String instanceName, String deviceId)
สร้างอุโมงค์ adb หรือ ssh ไปยังชื่ออินสแตนซ์ที่ระบุ และกำหนดปลายทางให้กับอุปกรณ์ผ่าน LHP ตามโหมดอุโมงค์ที่ระบุ
| พารามิเตอร์ | |
|---|---|
mode |
OxygenClient.LHPTunnelMode |
portNumber |
String |
instanceName |
String |
deviceId |
String |
| คิกรีเทิร์น | |
|---|---|
Process |
Process ของ adb ผ่านอุโมงค์ LHP |
getOverrideCvdPath
public String getOverrideCvdPath (TestDeviceOptions deviceOptions)
แสดงผลค่าของอาร์กิวเมนต์ "override_cvd_path" ใน TestDeviceOptions ที่ระบุ
| พารามิเตอร์ | |
|---|---|
deviceOptions |
TestDeviceOptions: TestDeviceOptions |
| คิกรีเทิร์น | |
|---|---|
String |
ค่าของ "override_cvd_path" หรือเป็นค่าว่างหากไม่มี |
leaseDevice
public CommandResult leaseDevice (IBuildInfo b, TestDeviceOptions deviceOptions, MultiMap<String, String> attributes)
พยายามเช่าอุปกรณ์โดยการเรียกไบนารีไคลเอ็นต์ Oxygen
| พารามิเตอร์ | |
|---|---|
b |
IBuildInfo: IBuildInfo |
deviceOptions |
TestDeviceOptions: TestDeviceOptions |
attributes |
MultiMap: แอตทริบิวต์ที่เชื่อมโยงกับการเรียกใช้ปัจจุบัน |
| คิกรีเทิร์น | |
|---|---|
CommandResult |
CommandResult ที่ไบนารีของ Oxygen แสดง |
leaseMultipleDevices
public CommandResult leaseMultipleDevices (buildInfos, TestDeviceOptions deviceOptions, MultiMap<String, String> attributes)
พยายามเช่าอุปกรณ์หลายเครื่องโดยการเรียกไบนารีไคลเอ็นต์ Oxygen
| พารามิเตอร์ | |
|---|---|
buildInfos |
: ERROR(/List |
deviceOptions |
TestDeviceOptions: TestDeviceOptions |
attributes |
MultiMap: แอตทริบิวต์ที่เชื่อมโยงกับการเรียกใช้ปัจจุบัน |
| คิกรีเทิร์น | |
|---|---|
CommandResult |
CommandResult ที่แสดงผลจากไบนารีของ Oxygen |
noWaitForBootSpecified
public Boolean noWaitForBootSpecified (TestDeviceOptions deviceOptions)
ตรวจสอบว่าได้ระบุ no_wait_for_boot ในคำขอเช่า Oxygen หรือไม่
| พารามิเตอร์ | |
|---|---|
deviceOptions |
TestDeviceOptions: TestDeviceOptions |
| คิกรีเทิร์น | |
|---|---|
Boolean |
จริงหากมีการระบุ no_wait_for_boot |
วางจำหน่าย
public boolean release (GceAvdInfo gceAvdInfo, TestDeviceOptions deviceOptions)
พยายามปล่อยอุปกรณ์โดยใช้ไบนารีไคลเอ็นต์ Oxygen
| พารามิเตอร์ | |
|---|---|
gceAvdInfo |
GceAvdInfo: GceAvdInfo |
deviceOptions |
TestDeviceOptions: TestDeviceOptions |
| คิกรีเทิร์น | |
|---|---|
boolean |
บูลีนที่ระบุว่าการเผยแพร่อุปกรณ์สําเร็จหรือไม่ |