OxygenClient

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)

지정된 TestDeviceOptions에서 'override_cvd_path' 인수 값을 반환합니다.

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

Oxygen 클라이언트 바이너리를 호출하여 기기 임대를 시도합니다.

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

Oxygen 클라이언트 바이너리를 호출하여 여러 기기를 임대해 봅니다.

Boolean noWaitForBootSpecified(TestDeviceOptions deviceOptions)

산소 임대 요청에 no_wait_for_boot가 지정되어 있는지 확인

boolean release(GceAvdInfo gceAvdInfo, TestDeviceOptions deviceOptions)

Oxygen 클라이언트 바이너리를 사용하여 기기 출시를 시도합니다.

필드

sGceDeviceParamsToOxygenMap

public static final  sGceDeviceParamsToOxygenMap

공개 생성자

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 LHP 터널을 통한 adb의 Process

getOverrideCvdPath

public String getOverrideCvdPath (TestDeviceOptions deviceOptions)

지정된 TestDeviceOptions에서 'override_cvd_path' 인수 값을 반환합니다.

매개변수
deviceOptions TestDeviceOptions: TestDeviceOptions

반환 값
String 'override_cvd_path' 값 또는 없는 경우 null

임대 기기

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

Oxygen 클라이언트 바이너리를 호출하여 기기 임대를 시도합니다.

매개변수
b IBuildInfo: IBuildInfo

deviceOptions TestDeviceOptions: TestDeviceOptions

attributes MultiMap: 현재 호출과 연결된 속성

반환 값
CommandResult 산소 바이너리가 반환한 CommandResult입니다.

leaseMultipleDevices

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

Oxygen 클라이언트 바이너리를 호출하여 여러 기기를 임대해 봅니다.

매개변수
buildInfos : ERROR(/List)

deviceOptions TestDeviceOptions: TestDeviceOptions

attributes MultiMap: 현재 호출과 연결된 속성

반환 값
CommandResult 산소 바이너리가 반환한 CommandResult입니다.

대기 시간 부트로 지정됨

public Boolean noWaitForBootSpecified (TestDeviceOptions deviceOptions)

산소 임대 요청에 no_wait_for_boot가 지정되어 있는지 확인

매개변수
deviceOptions TestDeviceOptions: TestDeviceOptions

반환 값
Boolean no_wait_for_boot가 지정된 경우 true

출시

public boolean release (GceAvdInfo gceAvdInfo, 
                TestDeviceOptions deviceOptions)

Oxygen 클라이언트 바이너리를 사용하여 기기 출시를 시도합니다.

매개변수
gceAvdInfo GceAvdInfo: GceAvdInfo

deviceOptions TestDeviceOptions: TestDeviceOptions

반환 값
boolean 기기 출시가 성공적인지 여부를 나타내는 부울입니다.