Class CallableRequestDispatch

  • All Implemented Interfaces:
    com.google.common.util.concurrent.ListenableFuture<Response>, ResponseHandler, java.util.concurrent.Callable<Response>, java.util.concurrent.Future<Response>

    public abstract class CallableRequestDispatch
    extends RequestDispatch
    implements java.util.concurrent.Callable<Response>
    This is a convenient subclass of RequestDispatch that implements the Callable interface. This should be used in place of RequestDispatch if you intend to schedule its execution. Because call() does not return until a Response becomes available, you can use the Future return value of ExecutorService.submit(Callable) to wait for it.
    Author:
    Simon Thoresen Hult
    • Constructor Detail

      • CallableRequestDispatch

        public CallableRequestDispatch()
    • Method Detail

      • call

        public final Response call()
                            throws java.lang.Exception
        Specified by:
        call in interface java.util.concurrent.Callable<Response>
        Throws:
        java.lang.Exception