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


מימוש IDeviceMonitor המדווח על תוצאות לשירות Tradefed Cluster.

סיכום

בנאים ציבוריים

ClusterDeviceMonitor ()

שיטות ציבוריות

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

מסמן ל- IDeviceMonitor שמצב התקן השתנה.

void run ()

שיטה שתיקרא לאחר הגדרת כל שדות ה-@Option של המוניטור.

void setDeviceLister ( IDeviceMonitor.DeviceLister lister)

מאפשר להגדיר את DeviceLister .

void stop ()

שיטה שתיקרא כאשר יהיה צורך לעצור את המוניטור.

בנאים ציבוריים

ClusterDeviceMonitor

public ClusterDeviceMonitor ()

שיטות ציבוריות

הודע ל-DeviceStateChange

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

מסמן ל- IDeviceMonitor שמצב התקן השתנה. יישומי ניטור צריכים להגביל את כמות העיבוד והאינטראקציה של IDeviceManager/DeviceLister שהם עושים בשיטה זו.

פרמטרים
serial String

oldState DeviceAllocationState

newState DeviceAllocationState

לָרוּץ

public void run ()

שיטה שתיקרא לאחר הגדרת כל שדות ה-@Option של המוניטור.

setDeviceLister

public void setDeviceLister (IDeviceMonitor.DeviceLister lister)

מאפשר להגדיר את DeviceLister . לאחר ניסיון מוצלח להגדיר את ה-Lister, יישומים עשויים לבטל את כל הניסיונות הבאים.

פרמטרים
lister IDeviceMonitor.DeviceLister

תפסיק

public void stop ()

שיטה שתיקרא כאשר יהיה צורך לעצור את המוניטור.