DeviceMonitorMultiplexer
public
class
DeviceMonitorMultiplexer
extends Object
implements
IDeviceMonitor
| java.lang.Object | |
| ↳ | com.android.tradefed.device.DeviceMonitorMultiplexer |
Một lớp proxy để truyền các yêu cầu đến nhiều IDeviceMonitor.
Tóm tắt
Hàm khởi tạo công khai | |
|---|---|
DeviceMonitorMultiplexer()
|
|
Phương thức công khai | |
|---|---|
void
|
addMonitor(IDeviceMonitor globalDeviceMonitor)
|
void
|
addMonitors(List<IDeviceMonitor> globalDeviceMonitors)
|
void
|
notifyDeviceStateChange(String serial, DeviceAllocationState oldState, DeviceAllocationState newState)
Báo hiệu |
void
|
removeMonitor(IDeviceMonitor mon)
|
void
|
run()
Một phương thức sẽ được gọi sau khi tất cả các trường @Option của Trình giám sát đã được đặt. |
void
|
setDeviceLister(IDeviceMonitor.DeviceLister lister)
Cho phép đặt |
void
|
stop()
Một phương thức sẽ được gọi khi cần dừng Trình giám sát. |
Hàm khởi tạo công khai
DeviceMonitorMultiplexer
public DeviceMonitorMultiplexer ()
Phương thức công khai
addMonitor
public void addMonitor (IDeviceMonitor globalDeviceMonitor)
| Tham số | |
|---|---|
globalDeviceMonitor |
IDeviceMonitor |
addMonitors
public void addMonitors (List<IDeviceMonitor> globalDeviceMonitors)
| Tham số | |
|---|---|
globalDeviceMonitors |
List |
notifyDeviceStateChange
public void notifyDeviceStateChange (String serial,
DeviceAllocationState oldState,
DeviceAllocationState newState)Báo hiệu IDeviceMonitor rằng trạng thái thiết bị đã thay đổi.
Các cách triển khai Trình giám sát nên giới hạn lượng hoạt động xử lý và
tương tác IDeviceManager/DeviceLister mà chúng thực hiện trong phương thức này.
| Tham số | |
|---|---|
serial |
String |
oldState |
DeviceAllocationState |
newState |
DeviceAllocationState |
run
public void run ()
Một phương thức sẽ được gọi sau khi tất cả các trường @Option của Trình giám sát đã được đặt.
setDeviceLister
public void setDeviceLister (IDeviceMonitor.DeviceLister lister)
Cho phép đặt DeviceLister. Sau khi cố gắng đặt Trình liệt kê thành công,
các cách triển khai có thể loại bỏ tất cả các lần thử tiếp theo.
| Tham số | |
|---|---|
lister |
IDeviceMonitor.DeviceLister |
stop
public void stop ()
Một phương thức sẽ được gọi khi cần dừng Trình giám sát.