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 ContentMetadataCodeccontentMetadataCodecprotected DelegatingErrorHandlererrorHandlerprotected LoggerheaderLogprotected IOExceptionRetryHandlerioRetryHandlerprotected Loggerloggerprotected DelegatingRetryHandlerretryHandlerprotected HttpUtilsutilsprotected HttpWirewire
-
Constructor Summary
Constructors Modifier Constructor Description protectedBaseHttpCommandExecutorService(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 voidcleanup(Q nativeRequest)protected abstract Qconvert(HttpRequest request)HttpResponseinvoke(HttpCommand command)Returns aHttpResponsefrom the server which responded to thecommand.protected abstract HttpResponseinvoke(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:HttpCommandExecutorServiceReturns aHttpResponsefrom the server which responded to thecommand.- Specified by:
invokein interfaceHttpCommandExecutorService
-
convert
protected abstract Q convert(HttpRequest request) throws IOException, InterruptedException
- Throws:
IOExceptionInterruptedException
-
invoke
protected abstract HttpResponse invoke(Q nativeRequest) throws IOException, InterruptedException
- Throws:
IOExceptionInterruptedException
-
cleanup
protected abstract void cleanup(Q nativeRequest)
-
-