Class ListenableActionFuture<T>

All Implemented Interfaces:
Future<T>, ActionFuture<T>, ActionListener<T>

public class ListenableActionFuture<T> extends AdapterActionFuture<T,T>
A Future and ActionListener against which which other ActionListeners can be registered later, to support fanning-out a result to a dynamic collection of listeners.
  • Constructor Details

    • ListenableActionFuture

      public ListenableActionFuture()
  • Method Details

    • addListener

      public void addListener(ActionListener<T> listener)
      Registers an ActionListener to be notified when this future is completed. If the future is already completed then the listener is notified immediately, on the calling thread. If not, the listener is notified on the thread that completes the listener.
    • done

      protected void done(boolean success)
      Description copied from class: BaseFuture
      Called when the BaseFuture is completed. The success boolean indicates if the BaseFuture was successfully completed (the value is true). In the cases the BaseFuture was completed with an error or cancelled the value is false.
      done in class BaseFuture<T>
      success - indicates if the BaseFuture was completed with success (true); in other cases it equals to false
    • convert

      protected T convert(T listenerResponse)
      Specified by:
      convert in class AdapterActionFuture<T,T>