DeviceMonitorBộ ghép kênh
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 tới nhiều IDeviceMonitor
.
Bản tóm tắt
Nhà thầu xây dựng công cộng | |
---|---|
DeviceMonitorMultiplexer () |
Phương pháp công cộng | |
---|---|
void | addMonitor ( IDeviceMonitor globalDeviceMonitor) |
void | addMonitors ( globalDeviceMonitors) addMonitors ( globalDeviceMonitors) |
void | notifyDeviceStateChange (String serial, DeviceAllocationState oldState, DeviceAllocationState newState) Báo hiệu cho |
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 Màn hình đã được đặt. |
void | setDeviceLister ( IDeviceMonitor.DeviceLister lister) Cho phép thiết lập |
void | stop () Một phương thức sẽ được gọi khi cần dừng Màn hình. |
Nhà thầu xây dựng công cộng
DeviceMonitorBộ ghép kênh
public DeviceMonitorMultiplexer ()
Phương pháp công cộng
thêm màn hình
public void addMonitor (IDeviceMonitor globalDeviceMonitor)
Thông số | |
---|---|
globalDeviceMonitor | IDeviceMonitor |
thêm màn hình
public void addMonitors (globalDeviceMonitors)
Thông số | |
---|---|
globalDeviceMonitors |
thông báoDeviceStateChange
public void notifyDeviceStateChange (String serial, DeviceAllocationState oldState, DeviceAllocationState newState)
Báo hiệu cho IDeviceMonitor
rằng trạng thái thiết bị đã được thay đổi. Việc triển khai giám sát sẽ hạn chế số lượng xử lý và tương tác IDeviceManager/DeviceLister mà họ thực hiện trong phương pháp này.
Thông số | |
---|---|
serial | String |
oldState | DeviceAllocationState |
newState | DeviceAllocationState |
chạy
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 Màn hình đã được đặt.
setDeviceLister
public void setDeviceLister (IDeviceMonitor.DeviceLister lister)
Cho phép thiết lập DeviceLister
. Sau khi thử thiết lập Lister thành công, quá trình triển khai có thể loại bỏ tất cả các lần thử tiếp theo.
Thông số | |
---|---|
lister | IDeviceMonitor.DeviceLister |
dừng lại
public void stop ()
Một phương thức sẽ được gọi khi cần dừng Màn hình.