Package com.backblaze.b2.client
Interface B2StorageClientWebifier
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
B2StorageClientWebifierImpl
public interface B2StorageClientWebifier extends java.lang.AutoCloseable
A B2StorageClientWebifier is responsible for converting from request objects to web calls and back again. * A webifier's main job is to hide the web-ness from the higher-level logic. * A webifier does NOT retry calls. * A webifier is stateless and does not cache anything. * Users can provide their own B2WebApiClient implementation to build on their favorite web framework or to help with unit testing. THREAD-SAFETY: Instances must be as thread-safe as the B2WebApiClient it's given. if the B2WebApiClient is thread-safe, so is the webifier. If not, the webifier isn't.
-
-
Method Summary
-
-
-
Method Detail
-
authorizeAccount
B2AccountAuthorization authorizeAccount(B2AuthorizeAccountRequest request) throws B2Exception
- Parameters:
request
- the account authorization request.- Returns:
- an account authorization.
- Throws:
B2Exception
- if there's any trouble. if it's a B2UnauthorizedException, the requestCategory will be set to ACCOUNT_AUTHORIZATION.
-
createBucket
B2Bucket createBucket(B2AccountAuthorization accountAuth, B2CreateBucketRequestReal request) throws B2Exception
- Throws:
B2Exception
-
createKey
B2CreatedApplicationKey createKey(B2AccountAuthorization accountAuth, B2CreateKeyRequestReal request) throws B2Exception
- Throws:
B2Exception
-
listKeys
B2ListKeysResponse listKeys(B2AccountAuthorization accountAuth, B2ListKeysRequestReal request) throws B2Exception
- Throws:
B2Exception
-
deleteKey
B2ApplicationKey deleteKey(B2AccountAuthorization accountAuth, B2DeleteKeyRequest request) throws B2Exception
- Throws:
B2Exception
-
listBuckets
B2ListBucketsResponse listBuckets(B2AccountAuthorization accountAuth, B2ListBucketsRequest request) throws B2Exception
- Throws:
B2Exception
-
getUploadUrl
B2UploadUrlResponse getUploadUrl(B2AccountAuthorization accountAuth, B2GetUploadUrlRequest request) throws B2Exception
- Throws:
B2Exception
-
getUploadPartUrl
B2UploadPartUrlResponse getUploadPartUrl(B2AccountAuthorization accountAuth, B2GetUploadPartUrlRequest request) throws B2Exception
- Throws:
B2Exception
-
uploadFile
B2FileVersion uploadFile(B2UploadUrlResponse uploadUrlResponse, B2UploadFileRequest request) throws B2Exception
- Throws:
B2Exception
-
copyFile
B2FileVersion copyFile(B2AccountAuthorization accountAuth, B2CopyFileRequest request) throws B2Exception
- Throws:
B2Exception
-
uploadPart
B2Part uploadPart(B2UploadPartUrlResponse uploadPartUrlResponse, B2UploadPartRequest request) throws B2Exception
- Throws:
B2Exception
-
copyPart
B2Part copyPart(B2AccountAuthorization accountAuth, B2CopyPartRequest request) throws B2Exception
- Throws:
B2Exception
-
listFileVersions
B2ListFileVersionsResponse listFileVersions(B2AccountAuthorization accountAuth, B2ListFileVersionsRequest request) throws B2Exception
- Throws:
B2Exception
-
listFileNames
B2ListFileNamesResponse listFileNames(B2AccountAuthorization accountAuth, B2ListFileNamesRequest request) throws B2Exception
- Throws:
B2Exception
-
listUnfinishedLargeFiles
B2ListUnfinishedLargeFilesResponse listUnfinishedLargeFiles(B2AccountAuthorization accountAuth, B2ListUnfinishedLargeFilesRequest request) throws B2Exception
- Throws:
B2Exception
-
startLargeFile
B2FileVersion startLargeFile(B2AccountAuthorization accountAuth, B2StartLargeFileRequest request) throws B2Exception
- Throws:
B2Exception
-
finishLargeFile
B2FileVersion finishLargeFile(B2AccountAuthorization accountAuth, B2FinishLargeFileRequest request) throws B2Exception
- Throws:
B2Exception
-
cancelLargeFile
B2CancelLargeFileResponse cancelLargeFile(B2AccountAuthorization accountAuth, B2CancelLargeFileRequest request) throws B2Exception
- Throws:
B2Exception
-
downloadById
void downloadById(B2AccountAuthorization accountAuth, B2DownloadByIdRequest request, B2ContentSink handler) throws B2Exception
- Throws:
B2Exception
-
downloadByName
void downloadByName(B2AccountAuthorization accountAuth, B2DownloadByNameRequest request, B2ContentSink handler) throws B2Exception
- Throws:
B2Exception
-
deleteFileVersion
B2DeleteFileVersionResponse deleteFileVersion(B2AccountAuthorization accountAuth, B2DeleteFileVersionRequest request) throws B2Exception
- Throws:
B2Exception
-
getDownloadAuthorization
B2DownloadAuthorization getDownloadAuthorization(B2AccountAuthorization accountAuth, B2GetDownloadAuthorizationRequest request) throws B2Exception
- Throws:
B2Exception
-
getFileInfo
B2FileVersion getFileInfo(B2AccountAuthorization accountAuth, B2GetFileInfoRequest request) throws B2Exception
- Throws:
B2Exception
-
getFileInfoByName
B2FileVersion getFileInfoByName(B2AccountAuthorization accountAuth, B2GetFileInfoByNameRequest request) throws B2Exception
- Throws:
B2Exception
-
hideFile
B2FileVersion hideFile(B2AccountAuthorization accountAuth, B2HideFileRequest request) throws B2Exception
- Throws:
B2Exception
-
updateBucket
B2Bucket updateBucket(B2AccountAuthorization accountAuth, B2UpdateBucketRequest request) throws B2Exception
- Throws:
B2Exception
-
deleteBucket
B2Bucket deleteBucket(B2AccountAuthorization accountAuth, B2DeleteBucketRequestReal request) throws B2Exception
- Throws:
B2Exception
-
listParts
B2ListPartsResponse listParts(B2AccountAuthorization b2AccountAuthorization, B2ListPartsRequest request) throws B2Exception
- Throws:
B2Exception
-
getDownloadByIdUrl
java.lang.String getDownloadByIdUrl(B2AccountAuthorization accountAuth, B2DownloadByIdRequest request) throws B2Exception
- Throws:
B2Exception
-
getDownloadByNameUrl
java.lang.String getDownloadByNameUrl(B2AccountAuthorization accountAuth, B2DownloadByNameRequest request) throws B2Exception
- Throws:
B2Exception
-
updateFileLegalHold
B2UpdateFileLegalHoldResponse updateFileLegalHold(B2AccountAuthorization accountAuth, B2UpdateFileLegalHoldRequest request) throws B2Exception
- Throws:
B2Exception
-
updateFileRetention
B2UpdateFileRetentionResponse updateFileRetention(B2AccountAuthorization accountAuth, B2UpdateFileRetentionRequest request) throws B2Exception
- Throws:
B2Exception
-
setBucketNotificationRules
B2SetBucketNotificationRulesResponse setBucketNotificationRules(B2AccountAuthorization accountAuth, B2SetBucketNotificationRulesRequest request) throws B2Exception
- Throws:
B2Exception
-
getBucketNotificationRules
B2GetBucketNotificationRulesResponse getBucketNotificationRules(B2AccountAuthorization accountAuth, B2GetBucketNotificationRulesRequest request) throws B2Exception
- Throws:
B2Exception
-
close
void close()
Closes this object and its underlying resources. This is overridden from AutoCloseable to declare that it can't throw any exception.- Specified by:
close
in interfacejava.lang.AutoCloseable
-
-