設備監控多工器
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 () 設定監視器的所有 @Option 欄位後將呼叫的方法。 |
void | setDeviceLister ( IDeviceMonitor.DeviceLister lister) 允許設定 |
void | stop () 當監視器需要停止時將呼叫的方法。 |
公共構造函數
設備監控多工器
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 ()
設定監視器的所有 @Option 欄位後將呼叫的方法。
設定設備列表
public void setDeviceLister (IDeviceMonitor.DeviceLister lister)
允許設定DeviceLister
。成功嘗試設定列表器後,實作可能會放棄所有後續嘗試。
參數 | |
---|---|
lister | IDeviceMonitor.DeviceLister |
停止
public void stop ()
當監視器需要停止時將呼叫的方法。