Google 致力于为黑人社区推动种族平等。查看具体举措
此页面由 Cloud Translation API 翻译。
Switch to English

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)

IDeviceMonitor设备状态已更改。

void removeMonitor ( IDeviceMonitor mon)
void run ()

设置所有Monitor的@Option字段后将调用的方法。

void setDeviceLister ( IDeviceMonitor.DeviceLister lister)

允许设置DeviceLister

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

removeMonitor

public void removeMonitor ( IDeviceMonitor mon)

参量
mon IDeviceMonitor

public void run ()

设置所有Monitor的@Option字段后将调用的方法。

setDeviceLister

public void setDeviceLister ( IDeviceMonitor.DeviceLister lister)

允许设置DeviceLister 。成功尝试设置Lister后,实现可能会丢弃所有后续尝试。

参量
lister IDeviceMonitor.DeviceLister

public void stop ()

需要停止Monitor时将调用的方法。