DataObserverpublic class DataObserverAsyncWrapper extends Object implements DataObserver
DataObserver. The DataObserverAsyncWrapper instance notifies the wrapped
DataObserver instance asynchronously.
The observer is used as an input parameter for the
ResultSet.registerObserver(ohos.data.rdb.DataObserver)
and ResultSet.unregisterObserver(ohos.data.rdb.DataObserver) methods.
SystemCapability.Data#DATA_APPDATAMGR| 构造器 | 说明 |
|---|---|
DataObserverAsyncWrapper(DataObserver observer,
EventHandler eventHandler) |
A parameterized constructor used to create a
DataObserverAsyncWrapper instance. |
public DataObserverAsyncWrapper(DataObserver observer, EventHandler eventHandler)
DataObserverAsyncWrapper instance.observer - Indicates the DataObserver instance to be wrapped.eventHandler - Indicates the event handler used to notify the wrapped DataObserver instance in an
asynchronous thread.public void onChange()
DataObserverYou can define the logic applied after this method is called to meet your service requirements.
onChange 在接口中 DataObserverResultSet