Interface FutureContextListener<C,​V>

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    public interface FutureContextListener<C,​V>
    Listens to the result of a Future. The result of the asynchronous operation is notified once this listener is added by calling Future.addListener(Object, FutureContextListener).
     Future f = new DefaultPromise(..);
     f.addListener(context, (context, future) -> { .. });
    • Method Detail

      • operationComplete

        void operationComplete​(C context,
                               Future<? extends V> future)
                        throws Exception
        Invoked when the operation associated with the Future has been completed.
        future - the source Future which called this callback