DeviceMonitor
public
final
class
DeviceMonitor
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.device.server.DeviceMonitor |
DeviceMonitor は、adb に接続されているデバイスをモニタリングします。
1 つのスレッドで DeviceListMonitorTask を実行します。これにより、adb ホストへのソケット接続が確立され
、ERROR(DeviceListMonitorTask.ADB_TRACK_DEVICES_COMMAND/com.android.tradefed.device.server.DeviceListMonitorTask#ADB_TRACK_DEVICES_COMMAND DeviceListMonitorTask.ADB_TRACK_DEVICES_COMMAND) が発行されます。その後、デバイスの接続とデバイスの状態に関するすべての変更について、そのソケットをモニタリングします。ERROR(/AndroidDebugBridge::getClientSupport) が有効になっていない場合、ERROR(/DeviceClientMonitorTask) は実行されず、デバイスは登録されません。
別のスレッドで ERROR(/DeviceClientMonitorTask) を実行します。これにより、登録済みデバイスごとに adb ホストへのソケット
接続が確立され、ERROR(/DeviceClientMonitorTask.ADB_TRACK_JDWP_COMMAND) が発行されます。この接続で、デバイス上のアクティブなクライアント
をモニタリングします。注: 1 つのスレッドがすべてのデバイスからの jdwp 接続をモニタリングします。adb へのさまざまな
ソケット接続(デバイスごとに 1 つ)は、1 つのセレクタで多重化されます。
概要
ネストされたクラス | |
|---|---|
class |
DeviceMonitor.DeviceListComparisonResult
|
パブリック コンストラクタ | |
|---|---|
DeviceMonitor(AndroidDebugBridge server)
新しい |
|
パブリック メソッド | |
|---|---|
int
|
getConnectionAttemptCount()
|
IDevice[]
|
getDevices()
デバイスを返します。 |
int
|
getRestartAttemptCount()
|
boolean
|
hasInitialDeviceList()
|
boolean
|
isMonitoring()
モニタが現在デバッグ ブリッジ サーバーに接続されているかどうかを返します。 |
void
|
start()
モニタリングを開始します。 |
void
|
stop()
モニタリングを停止します。 |
パブリック コンストラクタ
DeviceMonitor
public DeviceMonitor (AndroidDebugBridge server)
新しい DeviceMonitor オブジェクトを作成し、実行中の AndroidDebugBridge オブジェクトにリンクします。
| パラメータ | |
|---|---|
server |
AndroidDebugBridge: 実行中の AndroidDebugBridge。 |
パブリック メソッド
getConnectionAttemptCount
public int getConnectionAttemptCount ()
| 戻り値 | |
|---|---|
int |
|
getRestartAttemptCount
public int getRestartAttemptCount ()
| 戻り値 | |
|---|---|
int |
|
hasInitialDeviceList
public boolean hasInitialDeviceList ()
| 戻り値 | |
|---|---|
boolean |
|
isMonitoring
public boolean isMonitoring ()
モニタが現在デバッグ ブリッジ サーバーに接続されているかどうかを返します。
| 戻り値 | |
|---|---|
boolean |
|
start
public void start ()
モニタリングを開始します。
stop
public void stop ()
モニタリングを停止します。