ClusterDeviceMonitor

public class ClusterDeviceMonitor
extends LabResourceDeviceMonitor

java.lang.Object
   ↳ com.google.dualhomelab.monitoringagent.resourcemonitoring.LabResourceServiceGrpc.LabResourceServiceImplBase
     ↳ com.android.tradefed.monitoring.LabResourceDeviceMonitor
       ↳ com.android.tradefed.cluster.ClusterDeviceMonitor


Cách triển khai IDeviceMonitor báo cáo kết quả cho dịch vụ cụm Tradefed.

Tóm tắt

Hàm khởi tạo công khai

ClusterDeviceMonitor()

Phương thức công khai

void notifyDeviceStateChange(String serial, DeviceAllocationState oldState, DeviceAllocationState newState)

Báo hiệu cho IDeviceMonitor rằng trạng thái thiết bị đã thay đổi.

void run()

Một phương thức sẽ được gọi sau khi tất cả các trường @Option của Monitor đã được đặt.

void setDeviceLister(IDeviceMonitor.DeviceLister lister)

Cho phép đặt DeviceLister.

void stop()

Một phương thức sẽ được gọi khi cần dừng Trình theo dõi.

Hàm khởi tạo công khai

ClusterDeviceMonitor

public ClusterDeviceMonitor ()

Phương thức công khai

notifyDeviceStateChange

public void notifyDeviceStateChange (String serial, 
                DeviceAllocationState oldState, 
                DeviceAllocationState newState)

Báo hiệu cho IDeviceMonitor rằng trạng thái thiết bị đã thay đổi. Việc triển khai giám sát phải giới hạn lượng dữ liệu 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

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 Monitor đã được đặt.

setDeviceLister

public void setDeviceLister (IDeviceMonitor.DeviceLister lister)

Cho phép đặt DeviceLister. Sau khi thiết lập thành công Lister, các hoạt động triển khai có thể loại bỏ tất cả các lần thử tiếp theo.

Tham số
lister IDeviceMonitor.DeviceLister

điểm dừng

public void stop ()

Một phương thức sẽ được gọi khi cần dừng Trình theo dõi.