Package org.jclouds.http.internal
Class BaseHttpCommandExecutorService<Q>
- java.lang.Object
-
- org.jclouds.http.internal.BaseHttpCommandExecutorService<Q>
-
- All Implemented Interfaces:
HttpCommandExecutorService
- Direct Known Subclasses:
ApacheHCHttpCommandExecutorService
,JavaUrlHttpCommandExecutorService
,OkHttpCommandExecutorService
public abstract class BaseHttpCommandExecutorService<Q> extends Object implements HttpCommandExecutorService
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentMetadataCodec
contentMetadataCodec
protected DelegatingErrorHandler
errorHandler
protected Logger
headerLog
protected IOExceptionRetryHandler
ioRetryHandler
protected Logger
logger
protected DelegatingRetryHandler
retryHandler
protected HttpUtils
utils
protected HttpWire
wire
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseHttpCommandExecutorService(HttpUtils utils, ContentMetadataCodec contentMetadataCodec, DelegatingRetryHandler retryHandler, IOExceptionRetryHandler ioRetryHandler, DelegatingErrorHandler errorHandler, HttpWire wire, String idempotentMethods)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
cleanup(Q nativeRequest)
protected abstract Q
convert(HttpRequest request)
HttpResponse
invoke(HttpCommand command)
Returns aHttpResponse
from the server which responded to thecommand
.protected abstract HttpResponse
invoke(Q nativeRequest)
-
-
-
Field Detail
-
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
-
logger
protected Logger logger
-
headerLog
@Named("jclouds.headers") protected Logger headerLog
-
wire
protected final HttpWire wire
-
-
Constructor Detail
-
BaseHttpCommandExecutorService
protected BaseHttpCommandExecutorService(HttpUtils utils, ContentMetadataCodec contentMetadataCodec, DelegatingRetryHandler retryHandler, IOExceptionRetryHandler ioRetryHandler, DelegatingErrorHandler errorHandler, HttpWire wire, @Named("jclouds.idempotent-methods") String idempotentMethods)
-
-
Method Detail
-
invoke
public HttpResponse invoke(HttpCommand command)
Description copied from interface:HttpCommandExecutorService
Returns aHttpResponse
from the server which responded to thecommand
.- Specified by:
invoke
in interfaceHttpCommandExecutorService
-
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 nativeRequest)
-
-