to top
public interface

IDeviceMonitor

com.android.tradefed.device.IDeviceMonitor
Known Indirect Subclasses

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(String serial, DeviceAllocationState oldState, DeviceAllocationState newState)
Signals the IDeviceMonitor that a device state has been changed.
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 (String serial, DeviceAllocationState oldState, DeviceAllocationState newState)

Signals the IDeviceMonitor that a device state has been changed. Monitor implementations should limit the amount of processing and IDeviceManager/DeviceLister interaction they do in this method.

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.