Package org.jclouds.http.internal
Class JavaUrlHttpCommandExecutorService
- java.lang.Object
-
- org.jclouds.http.internal.BaseHttpCommandExecutorService<HttpURLConnection>
-
- org.jclouds.http.internal.JavaUrlHttpCommandExecutorService
-
- All Implemented Interfaces:
HttpCommandExecutorService
- Direct Known Subclasses:
ResponseStatusFromPayloadHttpCommandExecutorService
@Singleton public class JavaUrlHttpCommandExecutorService extends BaseHttpCommandExecutorService<HttpURLConnection>
-
-
Field Summary
Fields Modifier and Type Field Description protected intoutputSocketBufferSizeprotected com.google.common.base.Function<URI,Proxy>proxyForURIprotected com.google.common.base.Supplier<SSLContext>sslContextSupplierprotected com.google.common.base.Supplier<SSLContext>untrustedSSLContextProviderprotected StringuserAgentprotected HostnameVerifierverifier-
Fields inherited from class org.jclouds.http.internal.BaseHttpCommandExecutorService
contentMetadataCodec, errorHandler, headerLog, ioRetryHandler, logger, retryHandler, utils, wire
-
-
Constructor Summary
Constructors Constructor Description JavaUrlHttpCommandExecutorService(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, String idempotentMethods, int outputSocketBufferSize, String userAgent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcleanup(HttpURLConnection connection)protected voidconfigureRequestHeaders(HttpURLConnection connection, HttpRequest request)Configure the HTTP request headers in the connection.protected HttpURLConnectionconvert(HttpRequest request)protected HttpURLConnectioninitConnection(HttpRequest request)Creates and initializes the connection.protected HttpResponseinvoke(HttpURLConnection connection)protected voidwriteNothing(HttpURLConnection connection)-
Methods inherited from class org.jclouds.http.internal.BaseHttpCommandExecutorService
invoke
-
-
-
-
Field Detail
-
untrustedSSLContextProvider
protected final com.google.common.base.Supplier<SSLContext> untrustedSSLContextProvider
-
verifier
protected final HostnameVerifier verifier
-
sslContextSupplier
@Inject(optional=true) protected com.google.common.base.Supplier<SSLContext> sslContextSupplier
-
outputSocketBufferSize
protected final int outputSocketBufferSize
-
userAgent
protected final String userAgent
-
-
Constructor Detail
-
JavaUrlHttpCommandExecutorService
@Inject public JavaUrlHttpCommandExecutorService(HttpUtils utils, ContentMetadataCodec contentMetadataCodec, DelegatingRetryHandler retryHandler, IOExceptionRetryHandler ioRetryHandler, DelegatingErrorHandler errorHandler, HttpWire wire, @Named("untrusted") HostnameVerifier verifier, @Named("untrusted") com.google.common.base.Supplier<SSLContext> untrustedSSLContextProvider, com.google.common.base.Function<URI,Proxy> proxyForURI, @Named("jclouds.idempotent-methods") String idempotentMethods, @Named("jclouds.output-socket-buffer-size") int outputSocketBufferSize, @Named("jclouds.user-agent") String userAgent)
-
-
Method Detail
-
invoke
protected HttpResponse invoke(HttpURLConnection connection) throws IOException, InterruptedException
- Specified by:
invokein classBaseHttpCommandExecutorService<HttpURLConnection>- Throws:
IOExceptionInterruptedException
-
convert
protected HttpURLConnection convert(HttpRequest request) throws IOException, InterruptedException
- Specified by:
convertin classBaseHttpCommandExecutorService<HttpURLConnection>- Throws:
IOExceptionInterruptedException
-
initConnection
protected HttpURLConnection initConnection(HttpRequest request) throws IOException
Creates and initializes the connection.- Throws:
IOException
-
configureRequestHeaders
protected void configureRequestHeaders(HttpURLConnection connection, HttpRequest request)
Configure the HTTP request headers in the connection.
-
writeNothing
protected void writeNothing(HttpURLConnection connection)
-
cleanup
protected void cleanup(HttpURLConnection connection)
- Specified by:
cleanupin classBaseHttpCommandExecutorService<HttpURLConnection>
-
-