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.

    @FunctionalInterface
    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.
        Parameters:
        future - the source Future which called this callback
        Throws:
        Exception