Interface FilterModel.Refresher<T>

Type Parameters:
T - the row type
All Known Implementing Classes:
AbstractFilterModelRefresher, FilterModel.AbstractRefresher
Enclosing interface:
FilterModel<T>

public static interface FilterModel.Refresher<T>
Handles refreshing data for a FilterModel.
  • Method Details

    • async

      State async()
      Sometimes we'd like to be able to refresh one or more models and perform some action on the refreshed data, after the refresh has finished, such as selecting a particular item or such. This is quite difficult to achieve with asynchronous refresh enabled, so here's a way to temporarily disable asynchronous refresh, for a more predictable behaviour.
      Returns:
      the State controlling whether asynchronous refreshing is enabled
      See Also:
    • observer

      StateObserver observer()
      Returns:
      an observer active while a refresh is in progress
    • success

      Observer<Collection<T>> success()
      Returns:
      an observer notified each time a successful refresh has been performed
    • failure

      Observer<Exception> failure()
      Returns:
      an observer notified each time an asynchronous refresh has failed