@Singleton public class OkHttpCommandExecutorService extends JavaUrlHttpCommandExecutorService
HttpCommandExecutorService
that uses the
OkHttp client to support modern HTTP methods such as PATCH.DEFAULT_USER_AGENT, proxyForURI, sslContextSupplier, untrustedSSLContextProvider, verifier
contentMetadataCodec, errorHandler, headerLog, ioRetryHandler, logger, retryHandler, utils, wire
Constructor and Description |
---|
OkHttpCommandExecutorService(HttpUtils utils,
ContentMetadataCodec contentMetadataCodec,
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, writeNothing
invoke
@Inject public OkHttpCommandExecutorService(HttpUtils utils, ContentMetadataCodec contentMetadataCodec, 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
JavaUrlHttpCommandExecutorService
initConnection
in class JavaUrlHttpCommandExecutorService
IOException
protected void configureRequestHeaders(HttpURLConnection connection, HttpRequest request)
JavaUrlHttpCommandExecutorService
configureRequestHeaders
in class JavaUrlHttpCommandExecutorService
Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.