Class AsyncDataProvider<T>

All Implemented Interfaces:
ConfigurableFilterDataProvider<T,SerializablePredicate<T>,SerializablePredicate<T>>, DataProvider<T,SerializablePredicate<T>>, InMemoryDataProvider<T>, Serializable

public class AsyncDataProvider<T> extends ListDataProvider<T>
A ListDataProvider whose contents are gathered in an asynchronous query.

Instances are just a ListDataProvider with support for asynchronous (re)loading of the underlying data in a background thread using an AsyncTaskManager. As a result, the UI never "locks up" while a backend data query executes.

The associated AsyncTaskManager provides status change notifications when a load operation starts, completes, fails, or is canceled. These updates can be used to drive GUI loading spinners, etc.

Load operations are initiated via load(), and may be canceled in progress via cancel(). Initiating a new load operation will cancel and replace any previous load operation still in progress.

All operations are atomic and race free. See AsyncTaskManager for details.

See Also: