org.jclouds.http.internal
Class BaseHttpCommandExecutorService<Q>
java.lang.Object
org.jclouds.http.internal.BaseHttpCommandExecutorService<Q>
- All Implemented Interfaces:
- HttpCommandExecutorService
- Direct Known Subclasses:
- ApacheHCHttpCommandExecutorService, GaeHttpCommandExecutorService, JavaUrlHttpCommandExecutorService
public abstract class BaseHttpCommandExecutorService<Q>
- extends Object
- implements HttpCommandExecutorService
- Author:
- Adrian Cole
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
utils
protected final HttpUtils utils
logger
protected Logger logger
headerLog
@Named(value="jclouds.headers")
protected Logger headerLog
wire
protected final HttpWire wire
BaseHttpCommandExecutorService
@Inject
protected BaseHttpCommandExecutorService(HttpUtils utils,
@Named(value="jclouds.io-worker-threads")
ExecutorService ioWorkerExecutor,
DelegatingRetryHandler retryHandler,
IOExceptionRetryHandler ioRetryHandler,
DelegatingErrorHandler errorHandler,
HttpWire wire)
consumeOnClose
public static InputStream consumeOnClose(InputStream in)
submit
public Future<HttpResponse> submit(HttpCommand command)
- Description copied from interface:
HttpCommandExecutorService
- Asks the command to build a request relevant for an endpoint that produces responses of
generic type
HttpResponse
. and invokes it on the endpoint, returning a future
- Specified by:
submit
in interface HttpCommandExecutorService
- Parameters:
command
- that generates requests
- Returns:
Future
containing the response from the endpoint
convert
protected abstract Q convert(HttpRequest request)
throws IOException,
InterruptedException
- Throws:
IOException
InterruptedException
invoke
protected abstract HttpResponse invoke(Q nativeRequest)
throws IOException,
InterruptedException
- Throws:
IOException
InterruptedException
cleanup
protected abstract void cleanup(Q nativeResponse)
Copyright © 2009-2012 jclouds. All Rights Reserved.