org.jclouds.http.internal
Class BaseHttpCommandExecutorService<Q>
java.lang.Object
org.jclouds.http.internal.BaseHttpCommandExecutorService<Q>
- All Implemented Interfaces:
- HttpCommandExecutorService
- Direct Known Subclasses:
- 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
contentMetadataCodec
protected final ContentMetadataCodec contentMetadataCodec
retryHandler
protected final DelegatingRetryHandler retryHandler
ioRetryHandler
protected final IOExceptionRetryHandler ioRetryHandler
errorHandler
protected final DelegatingErrorHandler errorHandler
ioExecutor
protected final com.google.common.util.concurrent.ListeningExecutorService ioExecutor
logger
protected Logger logger
headerLog
@Named(value="jclouds.headers")
protected Logger headerLog
wire
protected final HttpWire wire
BaseHttpCommandExecutorService
@Inject
protected BaseHttpCommandExecutorService(HttpUtils utils,
ContentMetadataCodec contentMetadataCodec,
@Named(value="jclouds.io-worker-threads")
com.google.common.util.concurrent.ListeningExecutorService ioExecutor,
DelegatingRetryHandler retryHandler,
IOExceptionRetryHandler ioRetryHandler,
DelegatingErrorHandler errorHandler,
HttpWire wire)
consumeOnClose
public static InputStream consumeOnClose(InputStream in)
invoke
public HttpResponse invoke(HttpCommand command)
- Description copied from interface:
HttpCommandExecutorService
- Returns a
HttpResponse from the server which responded to the
command.
- Specified by:
invoke in interface HttpCommandExecutorService
submit
public com.google.common.util.concurrent.ListenableFuture<HttpResponse> submit(HttpCommand command)
- Description copied from interface:
HttpCommandExecutorService
- Returns a potentially deferred
HttpResponse from a server responding to the
command. The output ListenableFuture need not be
done, making HttpCommandExecutorService
suitable for asynchronous derivations.
- Specified by:
submit in interface HttpCommandExecutorService
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-2013 jclouds. All Rights Reserved.