Package com.yahoo.jdisc.handler
Class CallableRequestDispatch
- java.lang.Object
-
- com.yahoo.jdisc.handler.RequestDispatch
-
- com.yahoo.jdisc.handler.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 ofRequestDispatch
that implements theCallable
interface. This should be used in place ofRequestDispatch
if you intend to schedule its execution. Becausecall()
does not return until aResponse
becomes available, you can use theFuture
return value ofExecutorService.submit(Callable)
to wait for it.- Author:
- Simon Thoresen Hult
-
-
Constructor Summary
Constructors Constructor Description CallableRequestDispatch()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Response
call()
-
Methods inherited from class com.yahoo.jdisc.handler.RequestDispatch
addListener, cancel, connect, connectFastWriter, dispatch, get, get, handleResponse, isCancelled, isDone, newRequest, requestContent
-
-