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)
指定された TestDeviceOptions の「override_cvd_path」引数の値を返します。 |
CommandResult
|
leaseDevice(IBuildInfo b, TestDeviceOptions deviceOptions, MultiMap<String, String> attributes)
Oxygen クライアント バイナリを呼び出してデバイスのリースを試みます。 |
CommandResult
|
leaseMultipleDevices(
Oxygen クライアント バイナリを呼び出して、複数のデバイスをリースしようとします。 |
Boolean
|
noWaitForBootSpecified(TestDeviceOptions deviceOptions)
Oxygen リース リクエストで no_wait_for_boot が指定されているかどうかを確認します。 |
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 |
LHP トンネル経由の adb の Process 。 |
getOverrideCvdPath
public String getOverrideCvdPath (TestDeviceOptions deviceOptions)
指定された TestDeviceOptions の「override_cvd_path」引数の値を返します。
パラメータ | |
---|---|
deviceOptions |
TestDeviceOptions : TestDeviceOptions |
戻り値 | |
---|---|
String |
「override_cvd_path」の値。存在しない場合は null |
leaseDevice
public CommandResult leaseDevice (IBuildInfo b, TestDeviceOptions deviceOptions, MultiMap<String, String> attributes)
Oxygen クライアント バイナリを呼び出して、デバイスのリースを試みます。
パラメータ | |
---|---|
b |
IBuildInfo : IBuildInfo |
deviceOptions |
TestDeviceOptions : TestDeviceOptions |
attributes |
MultiMap : 現在の呼び出しに関連付けられている属性 |
戻り値 | |
---|---|
CommandResult |
Oxygen バイナリが返した CommandResult 。 |
leaseMultipleDevices
public CommandResult leaseMultipleDevices (buildInfos, TestDeviceOptions deviceOptions, MultiMap<String, String> attributes)
Oxygen クライアント バイナリを呼び出して、複数のデバイスをリースしようとします。
パラメータ | |
---|---|
buildInfos |
: ERROR(/List |
deviceOptions |
TestDeviceOptions : TestDeviceOptions |
attributes |
MultiMap : 現在の呼び出しに関連付けられている属性 |
戻り値 | |
---|---|
CommandResult |
Oxygen バイナリが返した CommandResult 。 |
noWaitForBootSpecified
public Boolean noWaitForBootSpecified (TestDeviceOptions deviceOptions)
Oxygen リース リクエストで 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 |
デバイスのリリースが成功したかどうかを示すブール値。 |