public class S3DirectBatchHandler extends AbstractBatchHandler
Modifier and Type | Field and Description |
---|---|
static String |
ACCELERATE_MODE_ENABLED_PROPERTY |
protected boolean |
accelerateModeEnabled |
protected com.amazonaws.services.s3.AmazonS3 |
amazonS3 |
protected String |
bucket |
protected String |
bucketPrefix |
protected int |
expiration |
static String |
INFO_AWS_REGION |
static String |
INFO_AWS_SECRET_ACCESS_KEY |
static String |
INFO_AWS_SECRET_KEY_ID |
static String |
INFO_AWS_SESSION_TOKEN |
static String |
INFO_BASE_KEY |
static String |
INFO_BUCKET |
static String |
INFO_EXPIRATION |
static String |
INFO_USE_S3_ACCELERATE |
protected String |
policy |
static String |
POLICY_TEMPLATE_PROPERTY |
protected static Pattern |
REGEX_BUCKET_PATH_PLACE_HOLDER |
protected static Pattern |
REGEX_MULTIPART_ETAG |
protected String |
region |
static String |
ROLE_ARN_PROPERTY |
protected String |
roleArn |
protected com.amazonaws.services.securitytoken.AWSSecurityTokenService |
stsClient |
BATCH_HANDLER_NAME, name, PROP_TRANSIENT_STORE_NAME, transientStoreName
Constructor and Description |
---|
S3DirectBatchHandler() |
Modifier and Type | Method and Description |
---|---|
protected com.amazonaws.services.securitytoken.model.Credentials |
assumeRole(com.amazonaws.services.securitytoken.model.AssumeRoleRequest request) |
boolean |
completeUpload(String batchId,
String fileIndex,
BatchFileInfo fileInfo)
Callback for the batch handler to execute post-upload actions.
|
Batch |
getBatch(String batchId)
Attempts to fetch a batch with the given id.
|
protected void |
initialize(Map<String,String> properties) |
protected com.amazonaws.services.s3.AmazonS3 |
initializeS3Client(com.amazonaws.auth.AWSCredentialsProvider credentials) |
protected com.amazonaws.services.securitytoken.AWSSecurityTokenService |
initializeSTSClient(com.amazonaws.auth.AWSCredentialsProvider credentials) |
protected long |
lowerThresholdToUseMultipartCopy() |
generateBatchId, getBatchParameters, getName, getTransientStore, initialize, newBatch
protected static final Pattern REGEX_MULTIPART_ETAG
protected static final Pattern REGEX_BUCKET_PATH_PLACE_HOLDER
public static final String ACCELERATE_MODE_ENABLED_PROPERTY
public static final String POLICY_TEMPLATE_PROPERTY
public static final String ROLE_ARN_PROPERTY
public static final String INFO_AWS_SECRET_KEY_ID
public static final String INFO_AWS_SECRET_ACCESS_KEY
public static final String INFO_AWS_SESSION_TOKEN
public static final String INFO_BUCKET
public static final String INFO_BASE_KEY
public static final String INFO_EXPIRATION
public static final String INFO_AWS_REGION
public static final String INFO_USE_S3_ACCELERATE
protected com.amazonaws.services.securitytoken.AWSSecurityTokenService stsClient
protected com.amazonaws.services.s3.AmazonS3 amazonS3
protected String bucketPrefix
protected boolean accelerateModeEnabled
protected int expiration
public S3DirectBatchHandler()
protected void initialize(Map<String,String> properties)
initialize
in class AbstractBatchHandler
protected com.amazonaws.services.securitytoken.AWSSecurityTokenService initializeSTSClient(com.amazonaws.auth.AWSCredentialsProvider credentials)
protected com.amazonaws.services.s3.AmazonS3 initializeS3Client(com.amazonaws.auth.AWSCredentialsProvider credentials)
public Batch getBatch(String batchId)
BatchHandler
batchId
- the batch id to fetchnull
if not foundprotected com.amazonaws.services.securitytoken.model.Credentials assumeRole(com.amazonaws.services.securitytoken.model.AssumeRoleRequest request)
public boolean completeUpload(String batchId, String fileIndex, BatchFileInfo fileInfo)
BatchHandler
batchId
- the batch idfileIndex
- the file index within the batchfileInfo
- file information regarting the uploaded filetrue
if the action was successprotected long lowerThresholdToUseMultipartCopy()
Copyright © 2019 Nuxeo. All rights reserved.