/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.aliyun.oss;
import java.io.File;
import java.io.InputStream;
import java.net.URL;
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.aliyun.oss.common.auth.Credentials;
import com.aliyun.oss.common.comm.ResponseMessage;
import com.aliyun.oss.common.comm.SignVersion;
import com.aliyun.oss.model.*;
import com.aliyun.oss.model.SetBucketCORSRequest.CORSRule;
import com.aliyun.oss.model.InventoryConfiguration;
/**
* Entry point interface of Alibaba Cloud's OSS (Object Store Service)
* <p>
* Object Store Service (a.k.a OSS) is the massive, secure, low cost and highly
* reliable public storage which could be accessed from anywhere at anytime via
* REST APIs, SDKs or web console. <br>
* Developers could use OSS to create any services that need huge data storage
* and access throughput, such as media sharing web apps, cloud storage service
* or enterprise or personal data backup.
* </p>
*/
public interface OSS {
/**
* Switches to another users with specified credentials
*
* @param creds
* the credential to switch to。
*/
public void switchCredentials(Credentials creds);
/**
* Switches to another signature version
*
* @param signatureVersion
* the signature version to switch to。
*/
public void switchSignatureVersion(SignVersion signatureVersion);
/**
* Shuts down the OSS instance (release all resources) The OSS instance is
* not usable after its shutdown() is called.
*/
public void shutdown();
/**
* Get the statistics of the connection pool.
*/
public String getConnectionPoolStats();
/**
* Creates {@link Bucket} instance. The bucket name specified must be
* globally unique and follow the naming rules from
* https://www.alibabacloud.com/help/doc-detail/31827.htm?spm=a3c0i.o32012en
* .a3.1.64ece5e0jPpa2t.
*
* @param bucketName
* bucket name
*/
public Bucket createBucket(String bucketName) throws OSSException, ClientException;
/**
* Creates a {@link Bucket} instance with specified CreateBucketRequest
* information.
*
* @param createBucketRequest
* instance of {@link CreateBucketRequest}, which at least has
* bucket name information.
*/
public Bucket createBucket(CreateBucketRequest createBucketRequest) throws OSSException, ClientException;
/**
* Deletes the {@link Bucket} instance. A non-empty bucket could not be
* deleted.
*
* @param bucketName
* bucket name to delete.
*
* @return A {@link VoidResult} instance wrapped void return and
* contains some basic response options, such as requestId.
*/
public VoidResult deleteBucket(String bucketName) throws OSSException, ClientException;
/**
* Deletes the {@link Bucket} instance.
*
* @param genericRequest
* the generic request instance that has the bucket name
* information.
*
* @return A {@link VoidResult} instance wrapped void return and
* contains some basic response options, such as requestId.
*/
public VoidResult deleteBucket(GenericRequest genericRequest) throws OSSException, ClientException;
/**
* Returns all {@link Bucket} instances of the current account.
*
* @return A list of {@link Bucket} instances. If there's no buckets, the
* list will be empty (instead of null).
*/
public List<Bucket> listBuckets() throws OSSException, ClientException;
/**
* Returns all {@link Bucket} instances of the current account that meet the
* conditions specified.
*
* @param prefix
* The prefix of the bucket name returned. If null, the bucket
* name could have any prefix.
* @param marker
* The start point in the lexicographic order for the buckets to
* return. If null, return the buckets from the beginning in the
* lexicographic order. For example, if the account has buckets
* bk1, bk2, bk3. If the marker is set as bk2, then only bk2 and
* bk3 meet the criteria. But if the marker is null, then all
* three buckets meet the criteria.
* @param maxKeys
* Max bucket count to return. The valid value is from 1 to 1000,
* default is 100 if it's null.
* @return The list of {@link Bucket} instances.
*/
public BucketList listBuckets(String prefix, String marker, Integer maxKeys) throws OSSException, ClientException;
/**
* Returns all {@link Bucket} instances of the current account that meet the
* conditions specified.
*
* @param listBucketsRequest
* the ListBucketsRequest instance that defines the criteria
* which could have requirements on prefix, marker, maxKeys.
* @return The list of {@link Bucket} instances.
*/
public BucketList listBuckets(ListBucketsRequest listBucketsRequest) throws OSSException, ClientException;
/**
* Applies the Access Control List(ACL) on the {@link Bucket}.
*
* @param bucketName
* Bucket name.
* @param acl
* {@link CannedAccessControlList} instance. If the instance is
* null, no ACL change on the bucket (but the request is still
* sent).
*
* @return A {@link VoidResult} instance wrapped void return and
* contains some basic response options, such as requestId.
*/
public VoidResult setBucketAcl(String bucketName, CannedAccessControlList acl) throws OSSException, ClientException;
/**
* Sends the request to apply ACL on a {@link Bucket} instance.
*
* @param setBucketAclRequest
* SetBucketAclRequest instance which specifies the ACL and the
* bucket information.
*
* @return A {@link VoidResult} instance wrapped void return and
* contains some basic response options, such as requestId.
*/
public VoidResult setBucketAcl(SetBucketAclRequest setBucketAclRequest) throws OSSException, ClientException;
/**
* Returns the Access control List (ACL) of the {@link Bucket} instance.
*
* @param bucketName
* Bucket Name.
* @return Access Control List(ACL) {@link AccessControlList}.
*/
public AccessControlList getBucketAcl(String bucketName) throws OSSException, ClientException;
/**
* Gets the Access Control List(ACL) of the {@link Bucket} instance.
*
* @param genericRequest
* {@link GenericRequest} instance that has the bucket name
* information.
* @return {@link AccessControlList} instance.
*/
public AccessControlList getBucketAcl(GenericRequest genericRequest) throws OSSException, ClientException;
/**
* Gets the metadata of {@link Bucket}.
*
* @param bucketName
* Bucket name.
*
* @ret
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
阿里云java-sdk (1365个子文件)
stylesheet.css 11KB
titlebar.gif 10KB
background.gif 2KB
titlebar_end.gif 849B
tab.gif 291B
index-all.html 1.64MB
OSSClient.html 864KB
OSS.html 699KB
ClientException.html 401KB
OSSException.html 391KB
VoidResult.html 144KB
overview-tree.html 115KB
ClientConfiguration.html 107KB
GenericRequest.html 100KB
constant-values.html 98KB
OSSEncryptionClient.html 91KB
package-use.html 89KB
package-summary.html 71KB
RequestMarshallers.html 69KB
allclasses-frame.html 68KB
package-tree.html 63KB
OSSErrorCode.html 60KB
allclasses-noframe.html 60KB
ListVersionsRequest.html 60KB
LifecycleRule.html 59KB
IniEditor.html 57KB
ListObjectsV2Request.html 55KB
ObjectMetadata.html 55KB
RoutingRule.Redirect.html 51KB
UploadPartCopyRequest.html 51KB
CopyObjectRequest.html 49KB
BucketStat.html 49KB
GeneratePresignedUrlRequest.html 47KB
StringUtils.html 46KB
serialized-form.html 46KB
SelectObjectRequest.html 45KB
ObjectMetadata.html 45KB
CryptoModuleBase.html 45KB
DownloadFileRequest.html 44KB
GetObjectRequest.html 43KB
VersionListing.html 43KB
WebServiceRequest.html 43KB
AuthUtils.html 40KB
InventoryConfiguration.html 39KB
GenericRequest.html 38KB
AddBucketReplicationRequest.html 38KB
IniEditor.Section.html 36KB
ListObjectsV2Result.html 35KB
CreateBucketRequest.html 35KB
OSSVersionSummary.html 35KB
ListObjectsRequest.html 35KB
ServiceException.html 34KB
package-frame.html 34KB
ListBucketsRequest.html 33KB
Bucket.html 33KB
UploadFileRequest.html 32KB
BoundedInputStream.html 32KB
InventoryOSSBucketDestination.html 32KB
CaseInsensitiveMap.html 32KB
UserQosInfo.html 32KB
OSSException.html 32KB
PutObjectResult.html 32KB
CredentialsProviderFactory.html 31KB
OSSClientBuilder.html 31KB
BucketQosInfo.html 31KB
package-tree.html 31KB
ReplicationRule.html 31KB
RequestMessage.html 30KB
PartListing.html 30KB
UploadPartRequest.html 30KB
MultipartUploadListing.html 30KB
ListLiveChannelsRequest.html 30KB
HeadObjectRequest.html 30KB
AppendObjectRequest.html 29KB
PutObjectRequest.html 29KB
CreateLiveChannelRequest.html 29KB
CredentialsProvider.html 29KB
DefaultServiceClient.html 29KB
OSSEncryptionClientBuilder.html 29KB
ResponseHeaderOverrides.html 29KB
ProgressInputStream.html 29KB
AsyncFetchTaskConfiguration.html 29KB
ObjectListing.html 28KB
Credentials.html 27KB
CryptoConfiguration.html 27KB
CertificateConfiguration.html 27KB
ListMultipartUploadsRequest.html 27KB
WebServiceRequest.html 27KB
ExecutionContext.html 27KB
UdfApplicationInfo.html 26KB
CompleteMultipartUploadRequest.html 26KB
CreateSelectObjectMetadataRequest.html 26KB
PolicyConditions.html 26KB
RepeatableFileInputStream.html 26KB
DeleteVersionsRequest.html 26KB
ContentCryptoMaterial.html 26KB
SdkFilterInputStream.html 25KB
ClientException.html 25KB
GenericResult.html 25KB
SetBucketVersioningRequest.html 25KB
共 1365 条
- 1
- 2
- 3
- 4
- 5
- 6
- 14
资源评论
m0_73875592
- 粉丝: 26
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功