DataType - the type of the data which is being retrieved by the
AsyncDataLink reporting its state.public interface AsyncStateReporter<DataType>
AsyncDataLink created by the
AsyncLinks.createStateReporterLink
method.
AsyncDataLink notifying the method
of this interface does not call the method concurrently.
reportState
method must be as quick as possible and it must not wait for external events
or for other threads. Implementations of this interface in general are not
required to be synchronization transparent.| Modifier and Type | Method and Description |
|---|---|
void |
reportState(AsyncDataLink<DataType> dataLink,
AsyncDataListener<? super DataType> dataListener,
AsyncDataController controller)
The method to be called periodically to be notified of the state of the
progress of the data retrieving process.
|
void reportState(AsyncDataLink<DataType> dataLink, AsyncDataListener<? super DataType> dataListener, AsyncDataController controller)
This method is invoked until the data retrieving is finished (either due to completion, cancellation or an error). Note however, that this method may be invoked after the data retrieving is finished but should be stopped to be called not much after the data retrieving is finished.
To actually query the state of progress of the data retrieving process,
use the specified AsyncDataController.
dataLink - the AsyncDataLink which is providing the data
whose state is being watched. This argument cannot be null.dataListener - the AsyncDataListener to be notified of the
retrieved data. This argument cannot be null.controller - the AsyncDataController which can be used to
retrieve the state of the data retrieving process. This argument
cannot be null.