DeviceMonitorMultiplexer
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時將調用的方法。 |
公共建設者
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 ()
設置所有Monitor的@Option字段後將調用的方法。
setDeviceLister
第0352章
允許設置DeviceLister
。成功嘗試設置Lister後,實現可能會丟棄所有後續嘗試。
參量 | |
---|---|
lister | IDeviceMonitor.DeviceLister |
停
public void stop ()
需要停止Monitor時將調用的方法。