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 |
Implementacja IDeviceMonitor
, która przekazuje wyniki do usługi klastra Tradefed.
Podsumowanie
Konstruktory publiczne | |
---|---|
ClusterDeviceMonitor()
|
Metody publiczne | |
---|---|
void
|
notifyDeviceStateChange(String serial, DeviceAllocationState oldState, DeviceAllocationState newState)
Informuje |
void
|
run()
Metoda, która zostanie wywołana po ustawieniu wszystkich pól @Option obiektu Monitor. |
void
|
setDeviceLister(IDeviceMonitor.DeviceLister lister)
Zezwala na ustawienie |
void
|
stop()
Metoda, która zostanie wywołana, gdy trzeba zatrzymać monitor. |
Konstruktory publiczne
ClusterDeviceMonitor
public ClusterDeviceMonitor ()
Metody publiczne
notifyDeviceStateChange
public void notifyDeviceStateChange (String serial, DeviceAllocationState oldState, DeviceAllocationState newState)
Informuje IDeviceMonitor
, że stan urządzenia uległ zmianie.
Implementacje monitora powinny ograniczać ilość przetwarzania i interakcji z IDeviceManagerem/DeviceListerem w ramach tej metody.
Parametry | |
---|---|
serial |
String |
oldState |
DeviceAllocationState |
newState |
DeviceAllocationState |
home run
public void run ()
Metoda, która zostanie wywołana po ustawieniu wszystkich pól @Option obiektu Monitor.
setDeviceLister
public void setDeviceLister (IDeviceMonitor.DeviceLister lister)
Zezwala na ustawienie DeviceLister
. Po pomyślnym ustawieniu listera implementacje mogą odrzucać wszystkie kolejne próby.
Parametry | |
---|---|
lister |
IDeviceMonitor.DeviceLister |
zatrzymaj
public void stop ()
Metoda, która zostanie wywołana, gdy trzeba zatrzymać monitor.