@NotThreadSafe
@Path(value="s3")
@Produces(value="application/xml")
@Consumes(value={"text/xml","application/xml","application/octet-stream","application/x-www-form-urlencoded"})
public final class S3RestServiceHandler
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BUCKET_PARAM |
static int |
BUCKET_PATH_CACHE_SIZE |
static java.lang.String |
OBJECT_PARAM |
static java.lang.String |
SERVICE_PREFIX |
| Constructor and Description |
|---|
S3RestServiceHandler(javax.servlet.ServletContext context)
Constructs a new
S3RestServiceHandler. |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
createBucket(java.lang.String bucket,
java.lang.String tagging,
java.lang.String acl,
java.lang.String policy,
java.io.InputStream is)
Creates a bucket, or puts bucket tags on an existing bucket.
|
javax.ws.rs.core.Response |
createObjectOrUploadPart(java.lang.String contentMD5,
java.lang.String copySourceParam,
java.lang.String copySourceRange,
java.lang.String decodedLength,
S3Constants.Directive metadataDirective,
java.lang.String taggingHeader,
S3Constants.Directive taggingDirective,
java.lang.String contentTypeParam,
java.lang.String contentLength,
java.lang.String bucket,
java.lang.String object,
java.lang.Integer partNumber,
java.lang.String uploadId,
java.lang.String tagging,
java.lang.String acl,
java.io.InputStream is)
Uploads an object or part of an object in multipart upload.
|
javax.ws.rs.core.Response |
deleteBucket(java.lang.String bucket,
java.lang.String tagging,
java.lang.String policy)
Deletes a bucket, or deletes all tags from an existing bucket.
|
javax.ws.rs.core.Response |
deleteObjectOrAbortMultipartUpload(java.lang.String bucket,
java.lang.String object,
java.lang.String uploadId,
java.lang.String tagging)
Deletes an object, an object's tags, or aborts a multipart upload.
|
javax.ws.rs.core.Response |
getBucket(java.lang.String bucket,
java.lang.String markerParam,
java.lang.String prefixParam,
java.lang.String delimiterParam,
java.lang.String encodingTypeParam,
java.lang.Integer maxKeysParam,
java.lang.Integer listTypeParam,
java.lang.String continuationTokenParam,
java.lang.String startAfterParam,
java.lang.String tagging,
java.lang.String acl,
java.lang.String policy,
java.lang.String policyStatus,
java.lang.String location,
java.lang.String uploads)
Gets a bucket and lists all the objects or bucket tags in it.
|
javax.ws.rs.core.Response |
getObjectMetadata(java.lang.String bucket,
java.lang.String object)
Retrieves an object's metadata.
|
javax.ws.rs.core.Response |
getObjectOrListParts(java.lang.String range,
java.lang.String bucket,
java.lang.String object,
java.lang.String uploadId,
java.lang.String tagging,
java.lang.String acl)
Downloads an object or list parts of the object in multipart upload.
|
javax.ws.rs.core.Response |
headBucket(java.lang.String bucket)
HeadBucket - head a bucket to check for existence.
|
javax.ws.rs.core.Response |
initiateMultipartUpload(java.lang.String contentType,
java.lang.String bucket,
java.lang.String object,
java.lang.String uploads,
java.lang.String taggingHeader)
Initiates or completes a multipart upload based on query parameters.
|
javax.ws.rs.core.Response |
listAllMyBuckets()
Lists all buckets owned by you.
|
javax.ws.rs.core.Response |
postBucket(java.lang.String bucket,
java.lang.String delete,
int contentLength,
java.io.InputStream is)
Currently implements the DeleteObjects request type if the query parameter "delete" exists.
|
public static final java.lang.String SERVICE_PREFIX
public static final java.lang.String BUCKET_PARAM
public static final java.lang.String OBJECT_PARAM
public static final int BUCKET_PATH_CACHE_SIZE
public S3RestServiceHandler(@Context
javax.servlet.ServletContext context)
throws java.io.IOException,
AlluxioException
S3RestServiceHandler.context - context for the servletjava.io.IOExceptionAlluxioException@GET public javax.ws.rs.core.Response listAllMyBuckets()
@HEAD
@Path(value="{bucket}/")
public javax.ws.rs.core.Response headBucket(@PathParam(value="bucket")
java.lang.String bucket)
bucket - @GET
@Path(value="{bucket}/")
public javax.ws.rs.core.Response getBucket(@PathParam(value="bucket")
java.lang.String bucket,
@QueryParam(value="marker")
java.lang.String markerParam,
@QueryParam(value="prefix")
java.lang.String prefixParam,
@QueryParam(value="delimiter")
java.lang.String delimiterParam,
@QueryParam(value="encoding-type")
java.lang.String encodingTypeParam,
@QueryParam(value="max-keys")
java.lang.Integer maxKeysParam,
@QueryParam(value="list-type")
java.lang.Integer listTypeParam,
@QueryParam(value="continuation-token")
java.lang.String continuationTokenParam,
@QueryParam(value="start-after")
java.lang.String startAfterParam,
@QueryParam(value="tagging")
java.lang.String tagging,
@QueryParam(value="acl")
java.lang.String acl,
@QueryParam(value="policy")
java.lang.String policy,
@QueryParam(value="policyStatus")
java.lang.String policyStatus,
@QueryParam(value="location")
java.lang.String location,
@QueryParam(value="uploads")
java.lang.String uploads)
bucket - the bucket namemarkerParam - the optional marker paramprefixParam - the optional prefix paramdelimiterParam - the optional delimiter paramencodingTypeParam - optional encoding type parammaxKeysParam - the optional max keys paramlistTypeParam - if listObjectV2 requestcontinuationTokenParam - the optional continuationToken param for listObjectV2startAfterParam - the optional startAfter param for listObjectV2tagging - query string to indicate if this is for GetBucketTaggingacl - query string to indicate if this is for GetBucketAclpolicy - query string to indicate if this is for GetBucketPolicypolicyStatus - query string to indicate if this is for GetBucketPolicyStatuslocation - query parameter to indicate if this is for GetBucketLocationuploads - query string to indicate if this is for ListMultipartUploads@POST
@Path(value="{bucket}/")
public javax.ws.rs.core.Response postBucket(@PathParam(value="bucket")
java.lang.String bucket,
@QueryParam(value="delete")
java.lang.String delete,
@HeaderParam(value="Content-Length")
int contentLength,
java.io.InputStream is)
bucket - the bucket namedelete - the delete query parameter. Existence indicates to run the DeleteObjects implcontentLength - body content lengthis - the input stream to read the requestDeleteObjectsResult if this was a DeleteObjects request@PUT
@Path(value="{bucket}/")
@Consumes(value={"application/xml","application/octet-stream"})
public javax.ws.rs.core.Response createBucket(@PathParam(value="bucket")
java.lang.String bucket,
@QueryParam(value="tagging")
java.lang.String tagging,
@QueryParam(value="acl")
java.lang.String acl,
@QueryParam(value="policy")
java.lang.String policy,
java.io.InputStream is)
bucket - the bucket nametagging - query string to indicate if this is for PutBucketTagging or notacl - query string to indicate if this is for PutBucketAclpolicy - query string to indicate if this is for PutBucketPolicyis - the request body@DELETE
@Path(value="{bucket}/")
public javax.ws.rs.core.Response deleteBucket(@PathParam(value="bucket")
java.lang.String bucket,
@QueryParam(value="tagging")
java.lang.String tagging,
@QueryParam(value="policy")
java.lang.String policy)
bucket - the bucket nametagging - query string to indicate if this is for DeleteBucketTagging or notpolicy - query string to indicate if this is for DeleteBucketPolicy or not@PUT
@Path(value="{bucket}/{object:.+}")
@Consumes(value="*/*")
public javax.ws.rs.core.Response createObjectOrUploadPart(@HeaderParam(value="Content-MD5")
java.lang.String contentMD5,
@HeaderParam(value="x-amz-copy-source")
java.lang.String copySourceParam,
@HeaderParam(value="x-amz-copy-source-range")
java.lang.String copySourceRange,
@HeaderParam(value="x-amz-decoded-content-length")
java.lang.String decodedLength,
@HeaderParam(value="x-amz-metadata-directive")
S3Constants.Directive metadataDirective,
@HeaderParam(value="x-amz-tagging")
java.lang.String taggingHeader,
@HeaderParam(value="x-amz-tagging-directive")
S3Constants.Directive taggingDirective,
@HeaderParam(value="Content-Type")
java.lang.String contentTypeParam,
@HeaderParam(value="Content-Length")
java.lang.String contentLength,
@PathParam(value="bucket")
java.lang.String bucket,
@PathParam(value="object")
java.lang.String object,
@QueryParam(value="partNumber")
java.lang.Integer partNumber,
@QueryParam(value="uploadId")
java.lang.String uploadId,
@QueryParam(value="tagging")
java.lang.String tagging,
@QueryParam(value="acl")
java.lang.String acl,
java.io.InputStream is)
contentMD5 - the optional Base64 encoded 128-bit MD5 digest of the objectcopySourceParam - the URL-encoded source path to copy the new file fromcopySourceRange - the http range headerdecodedLength - the length of the content when in aws-chunked encodingcontentLength - the total length of the request bodycontentTypeParam - the content type of the request bodybucket - the bucket nameobject - the object namepartNumber - the identification of the part of the object in multipart upload,
otherwise nulluploadId - the upload ID of the multipart upload, otherwise nullmetadataDirective - one of COPY or REPLACE used for CopyObjecttagging - query string to indicate if this is for PutObjectTagging or nottaggingDirective - one of COPY or REPLACE used for CopyObjecttaggingHeader - the URL-encoded user tags passed in the headeracl - query string to indicate if this is for PutObjectAclis - the request body@POST
@Path(value="{bucket}/{object:.+}")
@Consumes(value="*/*")
public javax.ws.rs.core.Response initiateMultipartUpload(@HeaderParam(value="Content-Type")
java.lang.String contentType,
@PathParam(value="bucket")
java.lang.String bucket,
@PathParam(value="object")
java.lang.String object,
@QueryParam(value="uploads")
java.lang.String uploads,
@HeaderParam(value="x-amz-tagging")
java.lang.String taggingHeader)
contentType - header parameter Content-Typebucket - the bucket nameobject - the object nameuploads - the query parameter specifying that this request is to initiate a multipart
upload instead of uploading an object through HTTP multipart formstaggingHeader - the URL-encoded metadata tags passed in the header@HEAD
@Path(value="{bucket}/{object:.+}")
public javax.ws.rs.core.Response getObjectMetadata(@PathParam(value="bucket")
java.lang.String bucket,
@PathParam(value="object")
java.lang.String object)
bucket - the bucket nameobject - the object name@GET
@Path(value="{bucket}/{object:.+}")
@Produces(value={"application/octet-stream","application/xml","*/*"})
public javax.ws.rs.core.Response getObjectOrListParts(@HeaderParam(value="Range")
java.lang.String range,
@PathParam(value="bucket")
java.lang.String bucket,
@PathParam(value="object")
java.lang.String object,
@QueryParam(value="uploadId")
java.lang.String uploadId,
@QueryParam(value="tagging")
java.lang.String tagging,
@QueryParam(value="acl")
java.lang.String acl)
bucket - the bucket nameobject - the object nameuploadId - the ID of the multipart upload, if not null, listing parts of the objectrange - the http range headertagging - query string to indicate if this is for GetObjectTagging or notacl - query string to indicate if this is for GetObjectAcl or not@DELETE
@Path(value="{bucket}/{object:.+}")
public javax.ws.rs.core.Response deleteObjectOrAbortMultipartUpload(@PathParam(value="bucket")
java.lang.String bucket,
@PathParam(value="object")
java.lang.String object,
@QueryParam(value="uploadId")
java.lang.String uploadId,
@QueryParam(value="tagging")
java.lang.String tagging)
bucket - the bucket nameobject - the object nametagging - query string to indicate if this is for DeleteObjectTagging or notuploadId - the upload ID which identifies the incomplete multipart upload to be abortedCopyright © 2024. All Rights Reserved.