public class AsperaTransferManager extends Object
AsperaDelegateTokenProvider
to retrieve a delegate token for the
Aspera ServiceModifier and Type | Field and Description |
---|---|
protected static InternalLogApi |
log |
Modifier | Constructor and Description |
---|---|
protected |
AsperaTransferManager(AmazonS3 s3Client,
TokenManager tokenManager,
AsperaConfig asperaConfig,
AsperaTransferManagerConfig asperaTransferManagerConfig) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkAscpThreshold()
Check if ascp count has hit limit
If it has throw an exception
|
void |
checkMultiSessionAllGlobalConfig(TransferSpecs transferSpecs)
Modify the retrieved TransferSpec and apply an '-all' suffix to
the subdomain on the remote)host field
|
Future<AsperaTransaction> |
download(String bucket,
File localFileName,
String remoteFileName)
Downloads a file via Aspera FASP
|
Future<AsperaTransaction> |
download(String bucket,
File localFileName,
String remoteFileName,
AsperaConfig sessionDetails,
ProgressListener listenerChain) |
Future<AsperaTransaction> |
downloadDirectory(String bucketName,
String virtualDirectoryKeyPrefix,
File directory) |
Future<AsperaTransaction> |
downloadDirectory(String bucketName,
String virtualDirectoryKeyPrefix,
File directory,
AsperaConfig sessionDetails,
ProgressListener progressListener) |
void |
excludeSubdirectories(File directory,
TransferSpecs transferSpecs)
List all files within the folder to exclude all subdirectories & modify the transfer spec to
pass onto Aspera SDK
|
protected void |
finalize()
Releasing all resources created by
TransferManager before it
is being garbage collected. |
FASPConnectionInfo |
getFaspConnectionInfo(String bucketName)
Check the LRU cache to see if the Aspera Key has already been retrieved for
this bucket.
|
TransferSpecs |
getTransferSpec(FASPConnectionInfo faspConnectionInfo,
String localFileName,
String remoteFileName,
String direction) |
void |
modifyTransferSpec(AsperaConfig sessionDetails,
TransferSpecs transferSpecs)
Modify the retrieved TransferSpec with the customised AsperaConfig object
created by the user
|
AsperaTransaction |
processTransfer(String transferSpecStr,
String bucketName,
String key,
String fileName,
ProgressListener progressListener)
Process the transfer spec to call the underlying Aspera libraries to begin the transfer
|
void |
shutdownThreadPools()
Shutdown without interrupting the threads involved, so that, for example,
any upload in progress can complete without throwing
AbortedException . |
Future<AsperaTransaction> |
upload(String bucket,
File localFileName,
String remoteFileName)
Uploads a file via Aspera FASP
|
Future<AsperaTransaction> |
upload(String bucket,
File localFileName,
String remoteFileName,
AsperaConfig sessionDetails,
ProgressListener progressListener) |
Future<AsperaTransaction> |
uploadDirectory(String bucketName,
String virtualDirectoryKeyPrefix,
File directory,
boolean includeSubdirectories)
Subdirectories are included in the upload by default, to exclude ensure you pass through 'false' for
includeSubdirectories param
|
Future<AsperaTransaction> |
uploadDirectory(String bucketName,
String virtualDirectoryKeyPrefix,
File directory,
boolean includeSubdirectories,
AsperaConfig sessionDetails,
ProgressListener progressListener)
Subdirectories are included in the upload by default, to exclude ensure you pass through 'false' for
includeSubdirectories param
|
protected AsperaTransferManager |
withAsperaTransferManagerConfig(AsperaTransferManagerConfig asperaTransferManagerConfig)
Allows a user to overwrite the AsperaTransferManager with their own customised properties.
|
protected AsperaTransferManager |
withTokenManager(TokenManager tokenManager)
Allows a user to overwrite the TokenManager with their own.
|
protected static final InternalLogApi log
protected AsperaTransferManager(AmazonS3 s3Client, TokenManager tokenManager, AsperaConfig asperaConfig, AsperaTransferManagerConfig asperaTransferManagerConfig)
public Future<AsperaTransaction> upload(String bucket, File localFileName, String remoteFileName)
bucket
- - The bucket to upload the object tolocalFileName
- - File path & name of the file to uploadremoteFileName
- - The remote file name to save the object as on cloud storagepublic Future<AsperaTransaction> upload(String bucket, File localFileName, String remoteFileName, AsperaConfig sessionDetails, ProgressListener progressListener)
public Future<AsperaTransaction> download(String bucket, File localFileName, String remoteFileName)
bucket
- - The bucket to download the object fromlocalFileName
- - File path & name to save the downloaed file toremoteFileName
- - The remote file name to downloadpublic Future<AsperaTransaction> download(String bucket, File localFileName, String remoteFileName, AsperaConfig sessionDetails, ProgressListener listenerChain)
public Future<AsperaTransaction> downloadDirectory(String bucketName, String virtualDirectoryKeyPrefix, File directory)
public Future<AsperaTransaction> downloadDirectory(String bucketName, String virtualDirectoryKeyPrefix, File directory, AsperaConfig sessionDetails, ProgressListener progressListener)
public Future<AsperaTransaction> uploadDirectory(String bucketName, String virtualDirectoryKeyPrefix, File directory, boolean includeSubdirectories)
bucketName
- virtualDirectoryKeyPrefix
- directory
- includeSubdirectories
- public Future<AsperaTransaction> uploadDirectory(String bucketName, String virtualDirectoryKeyPrefix, File directory, boolean includeSubdirectories, AsperaConfig sessionDetails, ProgressListener progressListener)
bucketName
- virtualDirectoryKeyPrefix
- directory
- includeSubdirectories
- sessionDetails
- public AsperaTransaction processTransfer(String transferSpecStr, String bucketName, String key, String fileName, ProgressListener progressListener)
transferSpecStr
- bucketName
- key
- fileName
- public FASPConnectionInfo getFaspConnectionInfo(String bucketName)
bucketName
- public TransferSpecs getTransferSpec(FASPConnectionInfo faspConnectionInfo, String localFileName, String remoteFileName, String direction) throws SdkClientException, AmazonServiceException
public void checkMultiSessionAllGlobalConfig(TransferSpecs transferSpecs)
sessionDetails
- transferSpecs
- public void modifyTransferSpec(AsperaConfig sessionDetails, TransferSpecs transferSpecs)
sessionDetails
- transferSpecs
- public void excludeSubdirectories(File directory, TransferSpecs transferSpecs)
directory
- transferSpecs
- protected AsperaTransferManager withTokenManager(TokenManager tokenManager)
AsperaTransferManagerBuilder
tokenManager
- protected AsperaTransferManager withAsperaTransferManagerConfig(AsperaTransferManagerConfig asperaTransferManagerConfig)
AsperaTransferManagerBuilder
asperaTransferManagerConfig
- public void shutdownThreadPools()
AbortedException
.protected void finalize() throws Throwable
TransferManager
before it
is being garbage collected.protected void checkAscpThreshold()
Copyright © 2024. All rights reserved.