DeviceConcurrentUtil.ShellCommandCallable
public static abstract class DeviceConcurrentUtil.ShellCommandCallable
extends Object
java.lang.Object | |
↳ | com.android.tradefed.util.DeviceConcurrentUtil.ShellCommandCallable<V> |
一個ERROR(/Callable)
,它包含在ITestDevice
上執行 shell 命令的詳細信息。
必須實現processOutput(String)
來處理命令輸出並確定Callable
的返回
概括
公共構造函數 | |
---|---|
ShellCommandCallable () | |
ShellCommandCallable (ITestDevice device, String command, long timeout) |
公共方法 | |
---|---|
V | call () |
abstract V | processOutput (String output) |
ShellCommandCallable <V> | setCommand (String command) |
ShellCommandCallable <V> | setDevice (ITestDevice device) |
ShellCommandCallable <V> | setTimeout (long timeout) |
公共構造函數
ShellCommandCallable
public ShellCommandCallable ()
ShellCommandCallable
public ShellCommandCallable (ITestDevice device, String command, long timeout)
參數 | |
---|---|
device | ITestDevice |
command | String |
timeout | long |
公共方法
稱呼
public V call ()
退貨 | |
---|---|
V |
過程輸出
public abstract V processOutput (String output)
參數 | |
---|---|
output | String |
退貨 | |
---|---|
V |
設置命令
public ShellCommandCallable<V> setCommand (String command)
參數 | |
---|---|
command | String |
退貨 | |
---|---|
ShellCommandCallable <V> |
設置設備
public ShellCommandCallable<V> setDevice (ITestDevice device)
參數 | |
---|---|
device | ITestDevice |
退貨 | |
---|---|
ShellCommandCallable <V> |
設置超時
public ShellCommandCallable<V> setTimeout (long timeout)
參數 | |
---|---|
timeout | long |
退貨 | |
---|---|
ShellCommandCallable <V> |