DeviceMonitorMultiplexer
public
class
DeviceMonitorMultiplexer
extends Object
implements
IDeviceMonitor
java.lang.Object | |
↳ | com.android.tradefed.device.DeviceMonitorMultiplexer |
用於將要求傳播至多個 IDeviceMonitor
的 Proxy 類別。
摘要
公用建構函式 | |
---|---|
Device
|
公用方法 | |
---|---|
void
|
add
|
void
|
add
|
void
|
notifyDeviceStateChange(String serial, DeviceAllocationState oldState, DeviceAllocationState newState)
向 |
void
|
removeMonitor(IDeviceMonitor mon)
|
void
|
run()
在設定完所有監控器的 @Option 欄位後,系統會呼叫這個方法。 |
void
|
setDeviceLister(IDeviceMonitor.DeviceLister lister)
允許設定 |
void
|
stop()
當需要停止監控時,系統會呼叫這個方法。 |
公用建構函式
DeviceMonitorMultiplexer
public DeviceMonitorMultiplexer ()
公用方法
addMonitor
public void addMonitor (IDeviceMonitor globalDeviceMonitor)
參數 | |
---|---|
globalDeviceMonitor |
IDeviceMonitor |
addMonitors
public void addMonitors (globalDeviceMonitors)
參數 | |
---|---|
globalDeviceMonitors |
|
notifyDeviceStateChange
public void notifyDeviceStateChange (String serial, DeviceAllocationState oldState, DeviceAllocationState newState)
向 IDeviceMonitor
發出裝置狀態已變更的信號。監控實作項目應限制在這個方法中執行的處理量和 IDeviceManager/DeviceLister 互動。
參數 | |
---|---|
serial |
String |
oldState |
DeviceAllocationState |
newState |
DeviceAllocationState |
得分
public void run ()
在設定所有監控器的 @Option 欄位後,系統會呼叫這個方法。
setDeviceLister
public void setDeviceLister (IDeviceMonitor.DeviceLister lister)
允許設定 DeviceLister
。設定 Lister 成功後,實作項目可能會捨棄所有後續嘗試。
參數 | |
---|---|
lister |
IDeviceMonitor.DeviceLister |
轉機 1 次
public void stop ()
當需要停止監控時,系統會呼叫這個方法。