@Singleton public class OkHttpCommandExecutorService extends JavaUrlHttpCommandExecutorService
HttpCommandExecutorService that uses the
OkHttp client to support modern HTTP methods such as PATCH.BaseHttpCommandExecutorService.HttpResponseCallableDEFAULT_USER_AGENT, proxyForURI, sslContextSupplier, untrustedSSLContextProvider, verifiercontentMetadataCodec, errorHandler, headerLog, ioExecutor, ioRetryHandler, logger, retryHandler, utils, wire| Constructor and Description |
|---|
OkHttpCommandExecutorService(HttpUtils utils,
ContentMetadataCodec contentMetadataCodec,
com.google.common.util.concurrent.ListeningExecutorService ioExecutor,
DelegatingRetryHandler retryHandler,
IOExceptionRetryHandler ioRetryHandler,
DelegatingErrorHandler errorHandler,
HttpWire wire,
HostnameVerifier verifier,
com.google.common.base.Supplier<SSLContext> untrustedSSLContextProvider,
com.google.common.base.Function<URI,Proxy> proxyForURI) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureRequestHeaders(HttpURLConnection connection,
HttpRequest request)
Configure the HTTP request headers in the connection.
|
protected HttpURLConnection |
initConnection(HttpRequest request)
Creates and initializes the connection.
|
cleanup, convert, invoke, writeNothingconsumeOnClose, invoke, submit@Inject public OkHttpCommandExecutorService(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, @Named(value="untrusted") HostnameVerifier verifier, @Named(value="untrusted") com.google.common.base.Supplier<SSLContext> untrustedSSLContextProvider, com.google.common.base.Function<URI,Proxy> proxyForURI) throws SecurityException, NoSuchFieldException
protected HttpURLConnection initConnection(HttpRequest request) throws IOException
JavaUrlHttpCommandExecutorServiceinitConnection in class JavaUrlHttpCommandExecutorServiceIOExceptionprotected void configureRequestHeaders(HttpURLConnection connection, HttpRequest request)
JavaUrlHttpCommandExecutorServiceconfigureRequestHeaders in class JavaUrlHttpCommandExecutorServiceCopyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.