public interface

IDeviceMonitor

com.android.tradefed.device.IDeviceMonitor

Class Overview

Interface for monitoring state of devices. Intended to be passed to an IDeviceManager instance, at which point the IDeviceManager will invoke callbacks as the related events are triggered. Any caching or batching needs to be performed within the IDeviceMonitor instance.

Summary

Nested Classes
class IDeviceMonitor.DeviceLister A Runnable-like class that should return the known devices and their states. 
Public Methods
abstract void notifyDeviceStateChange()
Signals the IDeviceMonitor that device states may have been updated.
abstract void run()
A method that will be called after all of the Monitor's @Option fields have been set.
abstract void setDeviceLister(IDeviceMonitor.DeviceLister lister)
Allows the IDeviceMonitor.DeviceLister to be set.

Public Methods

public abstract void notifyDeviceStateChange ()

Signals the IDeviceMonitor that device states may have been updated. Monitor implementations should limit the amount of processing and IDeviceManager/DeviceLister interaction they do in this method. TODO: consider passing in serial and new state.

public abstract void run ()

A method that will be called after all of the Monitor's @Option fields have been set.

public abstract void setDeviceLister (IDeviceMonitor.DeviceLister lister)

Allows the IDeviceMonitor.DeviceLister to be set. After a successful attempt to set the Lister, implementations may discard all subsequent attempts.