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 int
outputSocketBufferSize
protected com.google.common.base.Function<URI,Proxy>
proxyForURI
protected com.google.common.base.Supplier<SSLContext>
sslContextSupplier
protected com.google.common.base.Supplier<SSLContext>
untrustedSSLContextProvider
protected String
userAgent
protected HostnameVerifier
verifier
-
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 void
cleanup(HttpURLConnection connection)
protected void
configureRequestHeaders(HttpURLConnection connection, HttpRequest request)
Configure the HTTP request headers in the connection.protected HttpURLConnection
convert(HttpRequest request)
protected HttpURLConnection
initConnection(HttpRequest request)
Creates and initializes the connection.protected HttpResponse
invoke(HttpURLConnection connection)
protected void
writeNothing(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:
invoke
in classBaseHttpCommandExecutorService<HttpURLConnection>
- Throws:
IOException
InterruptedException
-
convert
protected HttpURLConnection convert(HttpRequest request) throws IOException, InterruptedException
- Specified by:
convert
in classBaseHttpCommandExecutorService<HttpURLConnection>
- Throws:
IOException
InterruptedException
-
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:
cleanup
in classBaseHttpCommandExecutorService<HttpURLConnection>
-
-