DeviceMonitorMultiplexer

public class DeviceMonitorMultiplexer
extends Object implements IDeviceMonitor

java.lang.Object
   ↳ com.android.tradefed.device.DeviceMonitorMultiplexer


A proxy class to propagate requests to multiple IDeviceMonitors.

Summary

Public constructors

DeviceMonitorMultiplexer()

Public methods

void addMonitor(IDeviceMonitor globalDeviceMonitor)
void addMonitors(List<IDeviceMonitor> globalDeviceMonitors)
void notifyDeviceStateChange(String serial, DeviceAllocationState oldState, DeviceAllocationState newState)

Signals the IDeviceMonitor that a device state has been changed.

void removeMonitor(IDeviceMonitor mon)
void run()

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

void setDeviceLister(IDeviceMonitor.DeviceLister lister)

Allows the IDeviceMonitor.DeviceLister to be set.

Public constructors

DeviceMonitorMultiplexer

DeviceMonitorMultiplexer ()

Public methods

addMonitor

void addMonitor (IDeviceMonitor globalDeviceMonitor)

Parameters
globalDeviceMonitor IDeviceMonitor

addMonitors

void addMonitors (List<IDeviceMonitor> globalDeviceMonitors)

Parameters
globalDeviceMonitors List

notifyDeviceStateChange

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.

Parameters
serial String
oldState DeviceAllocationState
newState DeviceAllocationState

removeMonitor

void removeMonitor (IDeviceMonitor mon)

Parameters
mon IDeviceMonitor

run

void run ()

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

setDeviceLister

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.

Parameters
lister IDeviceMonitor.DeviceLister