Package com.yahoo.jdisc.handler
Class CallableResponseDispatch
java.lang.Object
com.yahoo.jdisc.handler.ResponseDispatch
com.yahoo.jdisc.handler.CallableResponseDispatch
public abstract class CallableResponseDispatch
extends ResponseDispatch
implements Callable<Boolean>
This is a convenient subclass of
ResponseDispatch
that implements the Callable
interface. This
should be used in place of ResponseDispatch
if you intend to schedule its execution. Because call()
does not return until the entirety of the Response
and its content have been consumed, you can use the
Future
return value of ExecutorService.submit(Callable)
to wait for it to complete.- Author:
- Simon Thoresen Hult
-
Constructor Summary
ConstructorDescriptionCallableResponseDispatch
(ResponseHandler handler) Constructs a new instances of this class over the givenResponseHandler
. -
Method Summary
Methods inherited from class com.yahoo.jdisc.handler.ResponseDispatch
cancel, connect, connectFastWriter, dispatch, get, get, isCancelled, isDone, newInstance, newInstance, newInstance, newInstance, newResponse, responseContent
-
Constructor Details
-
CallableResponseDispatch
Constructs a new instances of this class over the givenResponseHandler
. Invokingcall()
will dispatch to this handler.- Parameters:
handler
- The ResponseHandler to dispatch to.
-
-
Method Details