OxygenClient

public class OxygenClient
extends Object

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


Klasa zarządzająca użyciem pliku binarnego klienta Oxygen do dzierżawy lub uwolnienia urządzenia z tlenem.

Podsumowanie

Fieldsem

public static final sGceDeviceParamsToOxygenMap

Konstruktory publiczne

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

Konstruktor klasy OxygenClient.

Metody publiczne

void closeLHPConnection(Process p)

Zamknij połączenie ze zdalnym urządzeniem do tlenu z danym Process.

Integer createServerSocket()

Pomocnik tworzenia nieużywanego gniazda serwera.

Process createTunnelViaLHP(OxygenClient.LHPTunnelMode mode, String portNumber, String instanceName, String deviceId)

Utwórz tunel adb lub ssh do danej nazwy instancji i przypisz punkt końcowy do urządzenia przez LHP na podstawie danego trybu tunelu.

String getOverrideCvdPath(TestDeviceOptions deviceOptions)

Zwraca wartość argumentu „override_cvd_path” w podanym obiekcie TestDeviceOptions.

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

Spróbuj wynająć urządzenie, wywołując plik binarny klienta Oxygen.

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

Spróbuj wynająć wiele urządzeń, wywołując plik binarny klienta Oxygen.

Boolean noWaitForBootSpecified(TestDeviceOptions deviceOptions)

Sprawdź, czy w żądaniu leasingu tlenu określono wartość no_wait_for_boot

boolean release(GceAvdInfo gceAvdInfo, TestDeviceOptions deviceOptions)

Spróbuj zwolnić urządzenie za pomocą pliku binarnego klienta Oxygen.

Fieldsem

sGceDeviceParamsToOxygenMap

public static final  sGceDeviceParamsToOxygenMap

Konstruktory publiczne

OxygenClient

public OxygenClient (File clientBinary, 
                IRunUtil runUtil)

Parametry
clientBinary File

runUtil IRunUtil

OxygenClient

public OxygenClient (File clientBinary)

Konstruktor klasy OxygenClient.

Parametry
clientBinary File: wykonywalny plik binarny klienta Oxygen.

Metody publiczne

Zamknij LHPConnection

public void closeLHPConnection (Process p)

Zamknij połączenie ze zdalnym urządzeniem do tlenu z danym Process.

Parametry
p Process

createServerSocket

public Integer createServerSocket ()

Pomocnik tworzenia nieużywanego gniazda serwera.

Zwroty
Integer

createTunnelViaLHP

public Process createTunnelViaLHP (OxygenClient.LHPTunnelMode mode, 
                String portNumber, 
                String instanceName, 
                String deviceId)

Utwórz tunel adb lub ssh do danej nazwy instancji i przypisz punkt końcowy do urządzenia przez LHP na podstawie danego trybu tunelu.

Parametry
mode OxygenClient.LHPTunnelMode

portNumber String

instanceName String

deviceId String

Zwroty
Process Process adb przez tunel LHP.

getOverrideCvdPath

public String getOverrideCvdPath (TestDeviceOptions deviceOptions)

Zwraca wartość argumentu „override_cvd_path” w podanym obiekcie TestDeviceOptions.

Parametry
deviceOptions TestDeviceOptions: TestDeviceOptions

Zwroty
String wartość „override_cvd_path” lub null, jeśli nie występuje

leaseDevice

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

Spróbuj wynająć urządzenie, wywołując plik binarny klienta Oxygen.

Parametry
b IBuildInfo: IBuildInfo

deviceOptions TestDeviceOptions: TestDeviceOptions

attributes MultiMap: atrybuty powiązane z bieżącym wywołaniem.

Zwroty
CommandResult wartość CommandResult, którą zwrócił binarny tlen.

leaseWieleUrządzeń

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

Spróbuj wynająć wiele urządzeń, wywołując plik binarny klienta Oxygen.

Parametry
buildInfos : ERROR(/List)

deviceOptions TestDeviceOptions: TestDeviceOptions

attributes MultiMap: atrybuty powiązane z bieżącym wywołaniem.

Zwroty
CommandResult CommandResult, który zwrócił binarny tlen.

noWaitForBootSpecified

public Boolean noWaitForBootSpecified (TestDeviceOptions deviceOptions)

Sprawdź, czy w żądaniu leasingu tlenu określono wartość no_wait_for_boot

Parametry
deviceOptions TestDeviceOptions: TestDeviceOptions

Zwroty
Boolean true (prawda), jeśli określono parametr no_wait_for_boot

opublikować

public boolean release (GceAvdInfo gceAvdInfo, 
                TestDeviceOptions deviceOptions)

Spróbuj zwolnić urządzenie za pomocą pliku binarnego klienta Oxygen.

Parametry
gceAvdInfo GceAvdInfo: GceAvdInfo

deviceOptions TestDeviceOptions: TestDeviceOptions

Zwroty
boolean wartość logiczna, która wskazuje, czy udało się zwolnić urządzenie.