A partir del 27 de marzo de 2025, te recomendamos que uses android-latest-release
en lugar de aosp-main
para compilar y contribuir a AOSP. Para obtener más información, consulta Cambios en AOSP.
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
DeviceMonitorMultiplexer
public
class
DeviceMonitorMultiplexer
extends Object
implements
IDeviceMonitor
java.lang.Object
|
↳ |
com.android.tradefed.device.DeviceMonitorMultiplexer
|
Es una clase de proxy para propagar solicitudes a varios IDeviceMonitor
.
Resumen
Constructores públicos
DeviceMonitorMultiplexer
public DeviceMonitorMultiplexer ()
Métodos públicos
addMonitor
public void addMonitor (IDeviceMonitor globalDeviceMonitor)
Parámetros |
globalDeviceMonitor |
IDeviceMonitor |
addMonitors
public void addMonitors ( globalDeviceMonitors)
Parámetros |
globalDeviceMonitors |
|
notifyDeviceStateChange
public void notifyDeviceStateChange (String serial,
DeviceAllocationState oldState,
DeviceAllocationState newState)
Indica a IDeviceMonitor
que se cambió el estado de un dispositivo.
Las implementaciones de supervisión deben limitar la cantidad de procesamiento y la interacción de IDeviceManager/DeviceLister que realizan en este método.
Parámetros |
serial |
String |
oldState |
DeviceAllocationState |
newState |
DeviceAllocationState |
removeMonitor
public void removeMonitor (IDeviceMonitor mon)
Parámetros |
mon |
IDeviceMonitor |
run
public void run ()
Es un método al que se llamará después de que se hayan establecido todos los campos @Option del Monitor.
setDeviceLister
public void setDeviceLister (IDeviceMonitor.DeviceLister lister)
Permite establecer DeviceLister
. Después de un intento exitoso de configurar el Lister, las implementaciones pueden descartar todos los intentos posteriores.
Parámetros |
lister |
IDeviceMonitor.DeviceLister |
escala
public void stop ()
Es un método al que se llamará cuando se deba detener el Monitor.
El contenido y las muestras de código que aparecen en esta página están sujetas a las licencias que se describen en la Licencia de Contenido. Java y OpenJDK son marcas registradas de Oracle o sus afiliados.
Última actualización: 2025-07-27 (UTC)
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Falta la información que necesito","missingTheInformationINeed","thumb-down"],["Muy complicado o demasiados pasos","tooComplicatedTooManySteps","thumb-down"],["Desactualizado","outOfDate","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Problema con las muestras o los códigos","samplesCodeIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-07-27 (UTC)"],[],[],null,["# DeviceMonitorMultiplexer\n========================\n\n\n`\npublic\n\n\nclass\nDeviceMonitorMultiplexer\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\nimplements\n\n`[IDeviceMonitor](../../../../../../reference/tradefed/com/android/tradefed/device/IDeviceMonitor.html)`\n\n\n`\n\n|---|------------------------------------------------------|\n| java.lang.Object ||\n| ↳ | com.android.tradefed.device.DeviceMonitorMultiplexer |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA proxy class to propagate requests to multiple [IDeviceMonitor](../../../../../../reference/tradefed/com/android/tradefed/device/IDeviceMonitor.html)s.\n\nSummary\n-------\n\n| ### Public constructors ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[DeviceMonitorMultiplexer](../../../../../../reference/tradefed/com/android/tradefed/device/DeviceMonitorMultiplexer.html#DeviceMonitorMultiplexer())`() ` |\n\n| ### Public methods ||\n|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` void` | ` `[addMonitor](../../../../../../reference/tradefed/com/android/tradefed/device/DeviceMonitorMultiplexer.html#addMonitor(com.android.tradefed.device.IDeviceMonitor))`(`[IDeviceMonitor](../../../../../../reference/tradefed/com/android/tradefed/device/IDeviceMonitor.html)` globalDeviceMonitor) ` |\n| ` void` | ` `[addMonitors](../../../../../../reference/tradefed/com/android/tradefed/device/DeviceMonitorMultiplexer.html#addMonitors(\u003cany\u003e))`(` globalDeviceMonitors) |\n| ` void` | ` `[notifyDeviceStateChange](../../../../../../reference/tradefed/com/android/tradefed/device/DeviceMonitorMultiplexer.html#notifyDeviceStateChange(java.lang.String,%20com.android.tradefed.device.DeviceAllocationState,%20com.android.tradefed.device.DeviceAllocationState))`(String serial, `[DeviceAllocationState](../../../../../../reference/tradefed/com/android/tradefed/device/DeviceAllocationState.html)` oldState, `[DeviceAllocationState](../../../../../../reference/tradefed/com/android/tradefed/device/DeviceAllocationState.html)` newState) ` Signals the [IDeviceMonitor](../../../../../../reference/tradefed/com/android/tradefed/device/IDeviceMonitor.html) that a device state has been changed. |\n| ` void` | ` `[removeMonitor](../../../../../../reference/tradefed/com/android/tradefed/device/DeviceMonitorMultiplexer.html#removeMonitor(com.android.tradefed.device.IDeviceMonitor))`(`[IDeviceMonitor](../../../../../../reference/tradefed/com/android/tradefed/device/IDeviceMonitor.html)` mon) ` |\n| ` void` | ` `[run](../../../../../../reference/tradefed/com/android/tradefed/device/DeviceMonitorMultiplexer.html#run())`() ` A method that will be called after all of the Monitor's @Option fields have been set. |\n| ` void` | ` `[setDeviceLister](../../../../../../reference/tradefed/com/android/tradefed/device/DeviceMonitorMultiplexer.html#setDeviceLister(com.android.tradefed.device.IDeviceMonitor.DeviceLister))`(`[IDeviceMonitor.DeviceLister](../../../../../../reference/tradefed/com/android/tradefed/device/IDeviceMonitor.DeviceLister.html)` lister) ` Allows the [DeviceLister](../../../../../../reference/tradefed/com/android/tradefed/device/IDeviceMonitor.DeviceLister.html) to be set. |\n| ` void` | ` `[stop](../../../../../../reference/tradefed/com/android/tradefed/device/DeviceMonitorMultiplexer.html#stop())`() ` A method that will be called when the Monitor need to be stopped. |\n\nPublic constructors\n-------------------\n\n### DeviceMonitorMultiplexer\n\n```\npublic DeviceMonitorMultiplexer ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### addMonitor\n\n```\npublic void addMonitor (IDeviceMonitor globalDeviceMonitor)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------------------|-------------------------|\n| `globalDeviceMonitor` | `IDeviceMonitor` \u003cbr /\u003e |\n\n### addMonitors\n\n```\npublic void addMonitors ( globalDeviceMonitors)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------------------|--------|\n| `globalDeviceMonitors` | \u003cbr /\u003e |\n\n### notifyDeviceStateChange\n\n```\npublic void notifyDeviceStateChange (String serial, \n DeviceAllocationState oldState, \n DeviceAllocationState newState)\n```\n\nSignals the [IDeviceMonitor](../../../../../../reference/tradefed/com/android/tradefed/device/IDeviceMonitor.html) that a device state has been changed.\nMonitor implementations should limit the amount of processing and\nIDeviceManager/DeviceLister interaction they do in this method.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|--------------------------------|\n| `serial` | `String` \u003cbr /\u003e |\n| `oldState` | `DeviceAllocationState` \u003cbr /\u003e |\n| `newState` | `DeviceAllocationState` \u003cbr /\u003e |\n\n### removeMonitor\n\n```\npublic void removeMonitor (IDeviceMonitor mon)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------|-------------------------|\n| `mon` | `IDeviceMonitor` \u003cbr /\u003e |\n\n### run\n\n```\npublic void run ()\n```\n\nA method that will be called after all of the Monitor's @Option fields have been set.\n\n\u003cbr /\u003e\n\n### setDeviceLister\n\n```\npublic void setDeviceLister (IDeviceMonitor.DeviceLister lister)\n```\n\nAllows the [DeviceLister](../../../../../../reference/tradefed/com/android/tradefed/device/IDeviceMonitor.DeviceLister.html) to be set. After a successful attempt to set the Lister,\nimplementations may discard all subsequent attempts.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|--------------------------------------|\n| `lister` | `IDeviceMonitor.DeviceLister` \u003cbr /\u003e |\n\n### stop\n\n```\npublic void stop ()\n```\n\nA method that will be called when the Monitor need to be stopped.\n\n\u003cbr /\u003e"]]