ออกซิเจนไคลเอ็นต์

public class OxygenClient
extends Object

java.lang.Object
com.android.tradefed.device.cloud.OxygenClient


คลาสที่จัดการการใช้ไบนารีไคลเอ็นต์ออกซิเจนเพื่อเช่าหรือปล่อยอุปกรณ์ออกซิเจน

สรุป

ช่อง

public static final sGceDeviceParamsToOxygenMap

ช่างก่อสร้างสาธารณะ

OxygenClient(File clientBinary, IRunUtil runUtil)
OxygenClient(File clientBinary)

เครื่องมือสร้างคลาส OxygenClient

วิธีการสาธารณะ

void closeLHPConnection(Process p)

ปิดการเชื่อมต่อกับอุปกรณ์สร้างออกซิเจนระยะไกลด้วย Process ที่ระบุ

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)

ลองเช่าอุปกรณ์โดยเรียกใช้ไบนารีไคลเอ็นต์ออกซิเจน

CommandResult leaseMultipleDevices( buildInfos, TestDeviceOptions deviceOptions, MultiMap<String, String> attributes)

ลองเช่าอุปกรณ์หลายเครื่องโดยการเรียกใช้ไบนารีไคลเอ็นต์ของออกซิเจน

Boolean noWaitForBootSpecified(TestDeviceOptions deviceOptions)

ตรวจสอบว่ามีการระบุ no_wait_for_boot ในคำขอเช่าออกซิเจนหรือไม่

boolean release(GceAvdInfo gceAvdInfo, TestDeviceOptions deviceOptions)

พยายามปล่อยอุปกรณ์โดยใช้ไบนารีไคลเอ็นต์ของออกซิเจน

ช่อง

แผนที่แสดงออกซิเจนบนอุปกรณ์ของ sGceDeviceParam

public static final  sGceDeviceParamsToOxygenMap

ช่างก่อสร้างสาธารณะ

ออกซิเจนไคลเอ็นต์

public OxygenClient (File clientBinary, 
                IRunUtil runUtil)

พารามิเตอร์
clientBinary File

runUtil IRunUtil

ออกซิเจนไคลเอ็นต์

public OxygenClient (File clientBinary)

เครื่องมือสร้างคลาส OxygenClient

พารามิเตอร์
clientBinary File: ไฟล์ไบนารีของไคลเอ็นต์ออกซิเจนที่สั่งการได้

วิธีการสาธารณะ

ปิดLHPConnection

public void closeLHPConnection (Process p)

ปิดการเชื่อมต่อกับอุปกรณ์สร้างออกซิเจนระยะไกลด้วย Process ที่ระบุ

พารามิเตอร์
p Process

createServerSocket

public Integer createServerSocket ()

ผู้ช่วยในการสร้างซ็อกเก็ตเซิร์ฟเวอร์ที่ไม่ได้ใช้

คิกรีเทิร์น
Integer

สร้างอุโมงค์เสมือนLHP

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" หรือค่าว่าง หากไม่มี

อุปกรณ์เช่า

public CommandResult leaseDevice (IBuildInfo b, 
                TestDeviceOptions deviceOptions, 
                MultiMap<String, String> attributes)

ลองเช่าอุปกรณ์โดยเรียกใช้ไบนารีไคลเอ็นต์ออกซิเจน

พารามิเตอร์
b IBuildInfo: IBuildInfo

deviceOptions TestDeviceOptions: TestDeviceOptions

attributes MultiMap: แอตทริบิวต์ที่เชื่อมโยงกับการเรียกใช้ปัจจุบัน

คิกรีเทิร์น
CommandResult CommandResult ที่ไบนารีของออกซิเจนแสดงผล

เช่าหลายอุปกรณ์

public CommandResult leaseMultipleDevices ( buildInfos, 
                TestDeviceOptions deviceOptions, 
                MultiMap<String, String> attributes)

ลองเช่าอุปกรณ์หลายเครื่องโดยการเรียกใช้ไบนารีไคลเอ็นต์ของออกซิเจน

พารามิเตอร์
buildInfos : ERROR(/List)

deviceOptions TestDeviceOptions: TestDeviceOptions

attributes MultiMap: แอตทริบิวต์ที่เชื่อมโยงกับการเรียกใช้ปัจจุบัน

คิกรีเทิร์น
CommandResult CommandResult ที่ไบนารีของออกซิเจนแสดงผล

noWaitForBootSpecified

public Boolean noWaitForBootSpecified (TestDeviceOptions deviceOptions)

ตรวจสอบว่ามีการระบุ no_wait_for_boot ในคำขอเช่าออกซิเจนหรือไม่

พารามิเตอร์
deviceOptions TestDeviceOptions: TestDeviceOptions

คิกรีเทิร์น
Boolean จริงหากระบุ no_wait_for_boot

เผยแพร่

public boolean release (GceAvdInfo gceAvdInfo, 
                TestDeviceOptions deviceOptions)

พยายามปล่อยอุปกรณ์โดยใช้ไบนารีไคลเอ็นต์ของออกซิเจน

พารามิเตอร์
gceAvdInfo GceAvdInfo: GceAvdInfo

deviceOptions TestDeviceOptions: TestDeviceOptions

คิกรีเทิร์น
boolean เป็นบูลีนที่ระบุว่าการเปิดตัวอุปกรณ์สำเร็จหรือไม่