IDeviceMonitor
public interface IDeviceMonitor
com.android.tradefed.device.IDeviceMonitor |
장치의 상태를 모니터링하기 위한 인터페이스입니다. 에 전달하기위한 것 IDeviceManager
점하는 경우, IDeviceManager
관련 이벤트가 트리거 될 때 콜백을 호출합니다. 모든 캐싱 또는 배치 요구가 내에서 수행 할 IDeviceMonitor
인스턴스입니다.
요약
중첩 클래스 | |
---|---|
class | IDeviceMonitor.DeviceLister |
공개 메서드 | |
---|---|
abstract void | notifyDeviceStateChange (String serial, DeviceAllocationState oldState, DeviceAllocationState newState) 신호 |
abstract void | run () 모든 Monitor의 @Option 필드가 설정된 후에 호출될 메소드입니다. |
abstract void | setDeviceLister ( IDeviceMonitor.DeviceLister lister) 수 있습니다 |
abstract void | stop () Monitor를 중지해야 할 때 호출되는 메서드입니다. |
공개 메서드
알림 장치 상태 변경
public abstract void notifyDeviceStateChange (String serial, DeviceAllocationState oldState, DeviceAllocationState newState)
신호 IDeviceMonitor
장치 상태가 변경되었는지를. 모니터 구현은 이 메서드에서 수행하는 처리 및 IDeviceManager/DeviceLister 상호 작용의 양을 제한해야 합니다.
매개변수 | |
---|---|
serial | String |
oldState | DeviceAllocationState |
newState | DeviceAllocationState |
운영
public abstract void run ()
모든 Monitor의 @Option 필드가 설정된 후에 호출될 메소드입니다.
setDeviceLister
public abstract void setDeviceLister (IDeviceMonitor.DeviceLister lister)
수 있습니다 DeviceLister
설정 될 수 있습니다. Lister를 성공적으로 설정한 후 구현은 모든 후속 시도를 무시할 수 있습니다.
매개변수 | |
---|---|
lister | IDeviceMonitor.DeviceLister |
멈추다
public abstract void stop ()
Monitor를 중지해야 할 때 호출되는 메서드입니다.
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 2021-10-04 UTC.