public class ApacheUtils
extends java.lang.Object
Constructor and Description |
---|
ApacheUtils() |
Modifier and Type | Method and Description |
---|---|
private static void |
addPreemptiveAuthenticationProxy(org.apache.http.client.protocol.HttpClientContext clientContext,
HttpClientSettings settings) |
private static org.apache.http.auth.AuthScope |
newAuthScope(HttpClientSettings settings)
Returns a new instance of AuthScope used for proxy authentication.
|
static org.apache.http.HttpEntity |
newBufferedHttpEntity(org.apache.http.HttpEntity entity)
Utility function for creating a new BufferedEntity and wrapping any errors
as an AmazonClientException.
|
static org.apache.http.client.protocol.HttpClientContext |
newClientContext(HttpClientSettings settings,
java.util.Map<java.lang.String,? extends java.lang.Object> attributes)
Returns a new HttpClientContext used for request execution.
|
private static org.apache.http.auth.Credentials |
newNTCredentials(HttpClientSettings settings)
Returns a new instance of NTCredentials used for proxy authentication.
|
static org.apache.http.client.CredentialsProvider |
newProxyCredentialsProvider(HttpClientSettings settings)
Returns a new Credentials Provider for use with proxy authentication.
|
static org.apache.http.HttpEntity |
newStringEntity(java.lang.String s)
Utility function for creating a new StringEntity and wrapping any errors
as an AmazonClientException.
|
public static org.apache.http.HttpEntity newStringEntity(java.lang.String s)
s
- The string contents of the returned HTTP entity.public static org.apache.http.HttpEntity newBufferedHttpEntity(org.apache.http.HttpEntity entity) throws FakeIOException
entity
- The HTTP entity to wrap with a buffered HTTP entity.FakeIOException
- only for test simulationpublic static org.apache.http.client.protocol.HttpClientContext newClientContext(HttpClientSettings settings, java.util.Map<java.lang.String,? extends java.lang.Object> attributes)
public static org.apache.http.client.CredentialsProvider newProxyCredentialsProvider(HttpClientSettings settings)
private static org.apache.http.auth.Credentials newNTCredentials(HttpClientSettings settings)
private static org.apache.http.auth.AuthScope newAuthScope(HttpClientSettings settings)
private static void addPreemptiveAuthenticationProxy(org.apache.http.client.protocol.HttpClientContext clientContext, HttpClientSettings settings)