org.jclouds.http.internal
Class JavaUrlHttpCommandExecutorService
java.lang.Object
org.jclouds.http.internal.BaseHttpCommandExecutorService<HttpURLConnection>
org.jclouds.http.internal.JavaUrlHttpCommandExecutorService
- All Implemented Interfaces:
- HttpCommandExecutorService
@Singleton
public class JavaUrlHttpCommandExecutorService
- extends BaseHttpCommandExecutorService<HttpURLConnection>
Basic implementation of a HttpCommandExecutorService
.
- Author:
- Adrian Cole
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
USER_AGENT
public static final String USER_AGENT
logger
protected Logger logger
JavaUrlHttpCommandExecutorService
@Inject
public JavaUrlHttpCommandExecutorService(HttpUtils utils,
@Named(value="jclouds.io-worker-threads")
ExecutorService ioWorkerExecutor,
DelegatingRetryHandler retryHandler,
IOExceptionRetryHandler ioRetryHandler,
DelegatingErrorHandler errorHandler,
HttpWire wire,
@Named(value="untrusted")
HostnameVerifier verifier,
@Named(value="untrusted")
com.google.common.base.Supplier<SSLContext> untrustedSSLContextProvider)
throws SecurityException,
NoSuchFieldException
- Throws:
SecurityException
NoSuchFieldException
invoke
protected HttpResponse invoke(HttpURLConnection connection)
throws IOException,
InterruptedException
- Specified by:
invoke
in class BaseHttpCommandExecutorService<HttpURLConnection>
- Throws:
IOException
InterruptedException
convert
protected HttpURLConnection convert(HttpRequest request)
throws IOException,
InterruptedException
- Specified by:
convert
in class BaseHttpCommandExecutorService<HttpURLConnection>
- Throws:
IOException
InterruptedException
cleanup
protected void cleanup(HttpURLConnection connection)
- Only disconnect if there is no content, as disconnecting will throw away unconsumed content.
- Specified by:
cleanup
in class BaseHttpCommandExecutorService<HttpURLConnection>
Copyright © 2009-2011 jclouds. All Rights Reserved.