Package com.amazonaws.http.apache.utils
Class ApacheUtils
- java.lang.Object
-
- com.amazonaws.http.apache.utils.ApacheUtils
-
public class ApacheUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description ApacheUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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, Map<String,? extends Object> attributes)
Returns a new HttpClientContext used for request execution.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(String s)
Utility function for creating a new StringEntity and wrapping any errors as an AmazonClientException.
-
-
-
Method Detail
-
newStringEntity
public static org.apache.http.HttpEntity newStringEntity(String s)
Utility function for creating a new StringEntity and wrapping any errors as an AmazonClientException.- Parameters:
s
- The string contents of the returned HTTP entity.- Returns:
- A new StringEntity with the specified contents.
-
newBufferedHttpEntity
public static org.apache.http.HttpEntity newBufferedHttpEntity(org.apache.http.HttpEntity entity) throws FakeIOException
Utility function for creating a new BufferedEntity and wrapping any errors as an AmazonClientException.- Parameters:
entity
- The HTTP entity to wrap with a buffered HTTP entity.- Returns:
- A new BufferedHttpEntity wrapping the specified entity.
- Throws:
FakeIOException
- only for test simulation
-
newClientContext
public static org.apache.http.client.protocol.HttpClientContext newClientContext(HttpClientSettings settings, Map<String,? extends Object> attributes)
Returns a new HttpClientContext used for request execution.
-
newProxyCredentialsProvider
public static org.apache.http.client.CredentialsProvider newProxyCredentialsProvider(HttpClientSettings settings)
Returns a new Credentials Provider for use with proxy authentication.
-
-