public class GatekeeperClientUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private int |
connectionTimeout |
private org.apache.http.client.CredentialsProvider |
credentialsProvider |
private java.lang.String |
gatekeeperUrl |
private org.apache.http.client.HttpClient |
httpClientGatekeeper |
private static org.apache.commons.logging.Log |
log |
private int |
maxRetryCount |
private java.lang.Exception |
priorFailureException
Variable to store application exceptions, so that client failure information can be
included in the information provided to the Gatekeeper when uploads are retried.
|
private java.lang.String |
userAgentDescription |
| Constructor and Description |
|---|
GatekeeperClientUtils(java.lang.String gatekeeperUrl,
java.lang.String userAgentDescription,
int maxRetryCount,
int connectionTimeoutMS,
org.apache.http.client.CredentialsProvider credentialsProvider) |
| Modifier and Type | Method and Description |
|---|---|
S3Object[] |
buildS3ObjectsFromSignatureRequests(SignatureRequest[] srs)
Parse the data in a set of SignatureRequest objects and build the corresponding
S3Objects represented by that data.
|
java.lang.String |
getGatekeeperUrl() |
private org.apache.http.client.HttpClient |
initHttpConnection()
Prepares objects for HTTP communications with the Gatekeeper servlet.
|
GatekeeperMessage |
requestActionThroughGatekeeper(java.lang.String operationType,
java.lang.String bucketName,
S3Object[] objects,
java.util.Map applicationPropertiesMap)
Request permission from the Gatekeeper for a particular operation.
|
private org.apache.http.client.HttpClient httpClientGatekeeper
private static final org.apache.commons.logging.Log log
private java.lang.Exception priorFailureException
private java.lang.String gatekeeperUrl
private final java.lang.String userAgentDescription
private final int maxRetryCount
private final int connectionTimeout
private org.apache.http.client.CredentialsProvider credentialsProvider
public GatekeeperClientUtils(java.lang.String gatekeeperUrl,
java.lang.String userAgentDescription,
int maxRetryCount,
int connectionTimeoutMS,
org.apache.http.client.CredentialsProvider credentialsProvider)
gatekeeperUrl - userAgentDescription - maxRetryCount - connectionTimeoutMS - credentialsProvider - private org.apache.http.client.HttpClient initHttpConnection()
public GatekeeperMessage requestActionThroughGatekeeper(java.lang.String operationType, java.lang.String bucketName, S3Object[] objects, java.util.Map applicationPropertiesMap) throws org.apache.http.HttpException, java.lang.Exception
operationType - bucketName - objects - applicationPropertiesMap - org.apache.http.HttpExceptionjava.lang.Exceptionpublic S3Object[] buildS3ObjectsFromSignatureRequests(SignatureRequest[] srs)
srs - signature requests that represent S3 objects.public java.lang.String getGatekeeperUrl()