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( 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 DeviceLister to be set.

void stop()

A method that will be called when the Monitor need to be stopped.

Public constructors

DeviceMonitorMultiplexer

public DeviceMonitorMultiplexer ()

Public methods

addMonitor

public void addMonitor (IDeviceMonitor globalDeviceMonitor)

Parameters
globalDeviceMonitor IDeviceMonitor

addMonitors

public void addMonitors ( globalDeviceMonitors)

Parameters
globalDeviceMonitors

notifyDeviceStateChange

public 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

public void removeMonitor (IDeviceMonitor mon)

Parameters
mon IDeviceMonitor

run

public void run ()

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

setDeviceLister

public void setDeviceLister (IDeviceMonitor.DeviceLister lister)

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

Parameters
lister IDeviceMonitor.DeviceLister

stop

public void stop ()

A method that will be called when the Monitor need to be stopped.