public abstract class CallableResponseDispatch extends ResponseDispatch implements Callable<Boolean>
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.Modifier and Type | Field and Description |
---|---|
private ResponseHandler |
handler |
Constructor and Description |
---|
CallableResponseDispatch(ResponseHandler handler)
Constructs a new instances of this class over the given
ResponseHandler . |
Modifier and Type | Method and Description |
---|---|
Boolean |
call() |
cancel, connect, connectFastWriter, delegate, dispatch, isCancelled, newInstance, newInstance, newInstance, newInstance, newResponse, responseContent
addListener
private final ResponseHandler handler
public CallableResponseDispatch(ResponseHandler handler)
ResponseHandler
. Invoking call()
will
dispatch to this handler.handler
- The ResponseHandler to dispatch to.Copyright © 2018. All rights reserved.