IDeviceMonitor
public
interface
IDeviceMonitor
com.android.tradefed.device.IDeviceMonitor |
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 |
Public methods | |
---|---|
abstract
void
|
notifyDeviceStateChange(String serial, DeviceAllocationState oldState, DeviceAllocationState newState)
Signals the |
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 |
abstract
void
|
stop()
A method that will be called when the Monitor need to be stopped. |
Public methods
notifyDeviceStateChange
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.
Parameters | |
---|---|
serial |
String |
oldState |
DeviceAllocationState |
newState |
DeviceAllocationState |
run
public abstract void run ()
A method that will be called after all of the Monitor's @Option fields have been set.
setDeviceLister
public abstract 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 abstract void stop ()
A method that will be called when the Monitor need to be stopped.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-07-19 UTC.