org.jclouds.http.internal
Class JavaUrlHttpCommandExecutorService

java.lang.Object
  extended by org.jclouds.http.internal.BaseHttpCommandExecutorService<HttpURLConnection>
      extended by org.jclouds.http.internal.JavaUrlHttpCommandExecutorService
All Implemented Interfaces:
HttpCommandExecutorService

@Singleton
public class JavaUrlHttpCommandExecutorService
extends BaseHttpCommandExecutorService<HttpURLConnection>

Basic implementation of a HttpCommandExecutorService.

Author:
Adrian Cole

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jclouds.http.internal.BaseHttpCommandExecutorService
BaseHttpCommandExecutorService.HttpResponseCallable
 
Field Summary
static String DEFAULT_USER_AGENT
           
 
Fields inherited from class org.jclouds.http.internal.BaseHttpCommandExecutorService
contentMetadataCodec, errorHandler, headerLog, ioExecutor, ioRetryHandler, logger, retryHandler, utils, wire
 
Constructor Summary
JavaUrlHttpCommandExecutorService(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)
           
 
Method Summary
protected  void cleanup(HttpURLConnection connection)
           
protected  HttpURLConnection convert(HttpRequest request)
           
protected  HttpResponse invoke(HttpURLConnection connection)
           
protected  void writeNothing(HttpURLConnection connection)
           
 
Methods inherited from class org.jclouds.http.internal.BaseHttpCommandExecutorService
consumeOnClose, invoke, submit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_USER_AGENT

public static final String DEFAULT_USER_AGENT
Constructor Detail

JavaUrlHttpCommandExecutorService

@Inject
public JavaUrlHttpCommandExecutorService(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
Throws:
SecurityException
NoSuchFieldException
Method Detail

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

writeNothing

protected void writeNothing(HttpURLConnection connection)

cleanup

protected void cleanup(HttpURLConnection connection)
Specified by:
cleanup in class BaseHttpCommandExecutorService<HttpURLConnection>


Copyright © 2009-2013 jclouds. All Rights Reserved.