預設連線
public class DefaultConnection
extends AbstractConnection
java.lang.Object | ||
↳ | com.android.tradefed.device.connection.AbstractConnection | |
↳ | com.android.tradefed.device.connection.DefaultConnection |
設備的預設連線表示,假定為設備的標準 adb 連線。
概括
嵌套類 | |
---|---|
class | DefaultConnection.ConnectionBuilder Builder 用於描述連接。 |
受保護的構造函數 | |
---|---|
DefaultConnection ( DefaultConnection.ConnectionBuilder builder) 建構函數 |
公共方法 | |
---|---|
static DefaultConnection | createConnection ( DefaultConnection.ConnectionBuilder builder) 建立請求的連線。 |
static DefaultConnection | createInopConnection ( DefaultConnection.ConnectionBuilder builder) |
final MultiMap <String, String> | getAttributes () |
final IBuildInfo | getBuildInfo () |
final ITestDevice | getDevice () |
Integer | getInitialDeviceNumOffset () 傳回已知的設備編號偏移量(如果有)。 |
String | getInitialIp () 傳回設備的初始關聯 IP(如果有)。 |
String | getInitialSerial () 傳回設備的初始序列名稱。 |
String | getInitialUser () 傳回初始已知使用者(如果有)。 |
ITestLogger | getLogger () 將 |
boolean | wasTemporaryHolder () |
受保護的方法 | |
---|---|
IRunUtil | getRunUtil () 返回 |
受保護的構造函數
預設連線
protected DefaultConnection (DefaultConnection.ConnectionBuilder builder)
建構函數
參數 | |
---|---|
builder | DefaultConnection.ConnectionBuilder |
公共方法
建立連接
public static DefaultConnection createConnection (DefaultConnection.ConnectionBuilder builder)
建立請求的連線。
參數 | |
---|---|
builder | DefaultConnection.ConnectionBuilder |
退貨 | |
---|---|
DefaultConnection |
創建InopConnection
public static DefaultConnection createInopConnection (DefaultConnection.ConnectionBuilder builder)
參數 | |
---|---|
builder | DefaultConnection.ConnectionBuilder |
退貨 | |
---|---|
DefaultConnection |
取得初始設備編號偏移
public Integer getInitialDeviceNumOffset ()
傳回已知的設備編號偏移量(如果有)。如果不可用則傳回 null。
退貨 | |
---|---|
Integer |
取得初始IP
public String getInitialIp ()
傳回設備的初始關聯 IP(如果有)。如果沒有已知的初始 IP,則傳回 null。
退貨 | |
---|---|
String |
取得初始序號
public String getInitialSerial ()
傳回設備的初始序列名稱。
退貨 | |
---|---|
String |
取得初始用戶
public String getInitialUser ()
傳回初始已知使用者(如果有)。如果沒有初始已知用戶,則傳回 null。
退貨 | |
---|---|
String |
曾是臨時持有人
public boolean wasTemporaryHolder ()
退貨 | |
---|---|
boolean |
受保護的方法
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2023-12-01 (世界標準時間)。
[]
[]