AdbTcpConnection
public class AdbTcpConnection
extends DefaultConnection
java.lang.Object | |||
↳ | com.android.tradefed.device.connection.AbstractConnection | ||
↳ | com.android.tradefed.device.connection.DefaultConnection | ||
↳ | com.android.tradefed.device.connection.AdbTcpConnection |
デバイスのデフォルトの接続表現。デバイスの標準の adb 接続と見なされます。
まとめ
定数 | |
---|---|
long | DEFAULT_SHORT_CMD_TIMEOUT |
int | MAX_RETRIES |
long | RETRY_INTERVAL_MS |
long | WAIT_FOR_ADB_CONNECT
|
パブリック コンストラクター | |
---|---|
AdbTcpConnection ( DefaultConnection.ConnectionBuilder builder) |
公開メソッド | |
---|---|
boolean | adbTcpConnect (String host, String port) 特定のtcp ip Androidデバイスにadb接続するヘルパーメソッド |
boolean | adbTcpDisconnect (String host, String port) 特定の tcp ip Android デバイスから adb disconnect するヘルパー メソッド |
String | getHostName (String serial) デバイスに関連付けられたホスト名を返します。 |
String | getPortNum (String serial) デバイスに関連付けられたポート番号を返します。 |
void | reconnect (String serial) デバイスへの接続を再接続します。 |
void | tearDownConnection () 接続をクリーンアップします。 |
保護されたメソッド | |
---|---|
void | waitForAdbConnect (String serial, long waitTime) adb 接続が有効になっているかどうかを確認します。 |
定数
DEFAULT_SHORT_CMD_TIMEOUT
protected static final long DEFAULT_SHORT_CMD_TIMEOUT
定数値: 20000 (0x0000000000004e20)
MAX_RETRIES
protected static final int MAX_RETRIES
定数値: 5 (0x00000005)
RETRY_INTERVAL_MS
protected static final long RETRY_INTERVAL_MS
定数値: 5000 (0x0000000000001388)
WAIT_FOR_ADB_CONNECT
protected static final long WAIT_FOR_ADB_CONNECT
定数値: 120000 (0x000000000001d4c0)
パブリック コンストラクター
AdbTcpConnection
public AdbTcpConnection (DefaultConnection.ConnectionBuilder builder)
パラメーター | |
---|---|
builder | DefaultConnection.ConnectionBuilder |
公開メソッド
adbTcpConnect
public boolean adbTcpConnect (String host, String port)
特定のtcp ip Androidデバイスにadb接続するヘルパーメソッド
パラメーター | |
---|---|
host | String : tcp/ip Android デバイスのホスト名/IP |
port | String : tcp/ip デバイスのポート番号 |
戻り値 | |
---|---|
boolean | デバイスへの接続に成功した場合は true、それ以外の場合は false。 |
adbTcpDisconnect
public boolean adbTcpDisconnect (String host, String port)
特定の tcp ip Android デバイスから adb disconnect するヘルパー メソッド
パラメーター | |
---|---|
host | String : tcp/ip Android デバイスのホスト名/IP |
port | String : tcp/ip デバイスのポート番号 |
戻り値 | |
---|---|
boolean | デバイスへの切断に成功した場合は true、それ以外の場合は false。 |
getHostName
public String getHostName (String serial)
デバイスに関連付けられたホスト名を返します。シリアルより抜粋。
パラメーター | |
---|---|
serial | String |
戻り値 | |
---|---|
String |
getPortNum
public String getPortNum (String serial)
デバイスに関連付けられたポート番号を返します。シリアルより抜粋。
パラメーター | |
---|---|
serial | String |
戻り値 | |
---|---|
String |
再接続
public void reconnect (String serial)
デバイスへの接続を再接続します。
パラメーター | |
---|---|
serial | String : デバイスのシリアル番号。 |
スロー | |
---|---|
DeviceNotAvailableException |
ティアダウンコネクション
public void tearDownConnection ()
接続をクリーンアップします。
保護されたメソッド
waitForAdbConnect
protected void waitForAdbConnect (String serial, long waitTime)
adb 接続が有効になっているかどうかを確認します。
パラメーター | |
---|---|
serial | String |
waitTime | long |
スロー | |
---|---|
DeviceNotAvailableException |