Interface NotifyingFuture<T>

  • All Superinterfaces:
    java.util.concurrent.Future<T>
    All Known Implementing Classes:
    ExecutionService.DistributedFuture

    public interface NotifyingFuture<T>
    extends java.util.concurrent.Future<T>
    A sub-interface of a Future, that allows for listeners to be attached so that observers can be notified when the future completes.

    See FutureListener for more details.

    Since:
    2.9
    Author:
    Manik Surtani
    • Method Detail

      • setListener

        NotifyingFuture<T> setListener​(FutureListener<T> listener)
        Attaches a listener and returns the same future instance, to allow for 'building' futures.
        Parameters:
        listener - listener to attach
        Returns:
        the same future instance