Package com.yahoo.jdisc.handler
Class CallableRequestDispatch
java.lang.Object
com.yahoo.jdisc.handler.RequestDispatch
com.yahoo.jdisc.handler.CallableRequestDispatch
- All Implemented Interfaces:
ResponseHandler
,Callable<Response>
,Future<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 Summary
-
Method Summary
Methods inherited from class com.yahoo.jdisc.handler.RequestDispatch
addListener, cancel, connect, connectFastWriter, dispatch, get, get, handleResponse, isCancelled, isDone, newRequest, requestContent