默認連接
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 () 將 |
受保護的方法 | |
---|---|
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 |
getInitialDeviceNumOffset
public Integer getInitialDeviceNumOffset ()
返回已知的設備編號偏移量(如果有)。如果不可用,則返回 null。
退貨 | |
---|---|
Integer |
獲取初始IP
public String getInitialIp ()
將初始關聯的 ip 返回到設備(如果有)。如果沒有已知的初始 ip,則返回 null。
退貨 | |
---|---|
String |
獲取初始序列號
public String getInitialSerial ()
返回設備的初始序列名。
退貨 | |
---|---|
String |
獲取初始用戶
public String getInitialUser ()
返回初始已知用戶(如果有)。如果沒有初始已知用戶,則返回 null。
退貨 | |
---|---|
String |
受保護的方法
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2023-04-28 (世界標準時間)。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]