DeviceMonitor多路復用器
public class DeviceMonitorMultiplexer
extends Object
implements IDeviceMonitor
java.lang.Object | |
↳ | com.android.tradefed.device.DeviceMonitorMultiplexer |
將請求傳播到多個IDeviceMonitor
代理類。
概括
公共構造函數 | |
---|---|
DeviceMonitorMultiplexer () |
公共方法 | |
---|---|
void | addMonitor ( IDeviceMonitor globalDeviceMonitor) |
void | addMonitors ( globalDeviceMonitors) addMonitors ( globalDeviceMonitors) |
void | notifyDeviceStateChange (String serial, DeviceAllocationState oldState, DeviceAllocationState newState) 向 |
void | removeMonitor ( IDeviceMonitor mon) |
void | run () 設置 Monitor 的所有 @Option 字段後將調用的方法。 |
void | setDeviceLister ( IDeviceMonitor.DeviceLister lister) 允許設置 |
void | stop () 需要停止 Monitor 時將調用的方法。 |
公共構造函數
DeviceMonitor多路復用器
public DeviceMonitorMultiplexer ()
公共方法
添加監控
public void addMonitor (IDeviceMonitor globalDeviceMonitor)
參數 | |
---|---|
globalDeviceMonitor | IDeviceMonitor |
添加監視器
public void addMonitors (globalDeviceMonitors)
參數 | |
---|---|
globalDeviceMonitors |
通知設備狀態變化
public void notifyDeviceStateChange (String serial, DeviceAllocationState oldState, DeviceAllocationState newState)
向IDeviceMonitor
發出設備狀態已更改的信號。監視器實現應限制它們在此方法中執行的處理量和 IDeviceManager/DeviceLister 交互。
參數 | |
---|---|
serial | String |
oldState | DeviceAllocationState |
newState | DeviceAllocationState |
跑步
public void run ()
設置 Monitor 的所有 @Option 字段後將調用的方法。
設置設備列表
public void setDeviceLister (IDeviceMonitor.DeviceLister lister)
允許設置DeviceLister
。在成功嘗試設置 Lister 之後,實現可能會放棄所有後續嘗試。
參數 | |
---|---|
lister | IDeviceMonitor.DeviceLister |
停止
public void stop ()
需要停止 Monitor 時將調用的方法。