public abstract class BaseHttpCommandExecutorService<Q> extends Object implements HttpCommandExecutorService
| Modifier and Type | Class and Description |
|---|---|
class |
BaseHttpCommandExecutorService.HttpResponseCallable |
| Modifier and Type | Field and Description |
|---|---|
protected Logger |
headerLog |
protected Logger |
logger |
protected HttpUtils |
utils |
protected HttpWire |
wire |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseHttpCommandExecutorService(HttpUtils utils,
ExecutorService ioWorkerExecutor,
DelegatingRetryHandler retryHandler,
IOExceptionRetryHandler ioRetryHandler,
DelegatingErrorHandler errorHandler,
HttpWire wire) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
cleanup(Q nativeResponse) |
static InputStream |
consumeOnClose(InputStream in) |
protected abstract Q |
convert(HttpRequest request) |
protected abstract HttpResponse |
invoke(Q nativeRequest) |
Future<HttpResponse> |
submit(HttpCommand command)
Asks the command to build a request relevant for an endpoint that produces responses of
generic type
HttpResponse. |
protected final HttpUtils utils
protected Logger logger
protected final HttpWire wire
@Inject protected BaseHttpCommandExecutorService(HttpUtils utils, @Named(value="jclouds.io-worker-threads") ExecutorService ioWorkerExecutor, DelegatingRetryHandler retryHandler, IOExceptionRetryHandler ioRetryHandler, DelegatingErrorHandler errorHandler, HttpWire wire)
public static InputStream consumeOnClose(InputStream in)
public Future<HttpResponse> submit(HttpCommand command)
HttpCommandExecutorServiceHttpResponse. and invokes it on the endpoint, returning a futuresubmit in interface HttpCommandExecutorServicecommand - that generates requestsFuture containing the response from the endpointprotected abstract Q convert(HttpRequest request) throws IOException, InterruptedException
IOExceptionInterruptedExceptionprotected abstract HttpResponse invoke(Q nativeRequest) throws IOException, InterruptedException
IOExceptionInterruptedExceptionprotected abstract void cleanup(Q nativeResponse)
Copyright © 2009-2012 jclouds. All Rights Reserved.