@Singleton public class HttpUtils extends Object
Constructor and Description |
---|
HttpUtils(int connectionTimeout,
int soTimeout,
int globalMaxConnections,
int globalMaxConnectionsPerHost) |
@Inject public HttpUtils(@Named(value="jclouds.connection-timeout") int connectionTimeout, @Named(value="jclouds.so-timeout") int soTimeout, @Named(value="jclouds.max-connections-per-context") int globalMaxConnections, @Named(value="jclouds.max-connections-per-host") int globalMaxConnectionsPerHost)
public String getProxyHost()
org.jclouds.Constants.PROPERTY_PROXY_HOST
public Integer getProxyPort()
org.jclouds.Constants.PROPERTY_PROXY_PORT
public String getProxyUser()
org.jclouds.Constants.PROPERTY_PROXY_USER
public String getProxyPassword()
org.jclouds.Constants.PROPERTY_PROXY_PASSWORD
public int getSocketOpenTimeout()
public int getConnectionTimeout()
public boolean relaxHostname()
public boolean trustAllCerts()
public boolean useSystemProxies()
public int getMaxConnections()
public int getMaxConnectionsPerHost()
public static byte[] toByteArrayOrNull(PayloadEnclosing response)
public static byte[] closeClientButKeepContentStream(PayloadEnclosing response)
IOException
public static void copy(ContentMetadata fromMd, MutableContentMetadata toMd)
public void logRequest(Logger logger, HttpRequest request, String prefix)
public void logResponse(Logger logger, HttpResponse response, String prefix)
public void checkRequestHasRequiredProperties(HttpRequest message)
public static void releasePayload(HttpMessage from)
public static String nullToEmpty(byte[] md5)
public static String nullToEmpty(Collection<String> collection)
public static Long attemptToParseSizeAndRangeFromHeaders(HttpMessage from) throws HttpException
HttpException
public static void checkRequestHasContentLengthOrChunkedEncoding(HttpMessage request, String message)
public static void wirePayloadIfEnabled(Wire wire, HttpMessage request)
Copyright © 2009-2013 jclouds. All Rights Reserved.