@Test public void testRemoteHostUpdatedWhenAsperaTransferConfigMultiSession3RunTime() { AsperaConfig asperaConfig = new AsperaConfig(); asperaConfig.setMultiSession(3); TransferSpec transferSpec = new TransferSpec(); TransferSpecs transferSpecs = new TransferSpecs(); List<TransferSpec> list = new ArrayList<TransferSpec>(); list.add(transferSpec); transferSpecs.setTransfer_specs(list); AsperaTransferManager atm = new AsperaTransferManager(mockS3Client, mockTokenManager, mockAsperaConfig, mockAsperaTransferManagerConfig); atm.modifyTransferSpec(asperaConfig, transferSpecs); TransferSpec modifiedTransferSpec = transferSpecs.getTransfer_specs().get(0); assertEquals(3, modifiedTransferSpec.getMulti_session()); }
public void modifyTransferSpec(AsperaConfig sessionDetails, TransferSpecs transferSpecs) { for(TransferSpec transferSpec : transferSpecs.transfer_specs) { if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getTargetRateKbps()))) { transferSpec.setTarget_rate_kbps(sessionDetails.getTargetRateKbps()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getTargetRateCapKbps()))) { transferSpec.setTarget_rate_cap_kbps(sessionDetails.getTargetRateCapKbps()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getMinRateCapKbps()))) { transferSpec.setMin_rate_cap_kbps(sessionDetails.getMinRateCapKbps()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getMinRateKbps()))) { transferSpec.setMin_rate_kbps(sessionDetails.getMinRateKbps()); } if (!StringUtils.isNullOrEmpty(sessionDetails.getRatePolicy())) { transferSpec.setRate_policy(sessionDetails.getRatePolicy()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.isLockMinRate()))) { transferSpec.setLock_min_rate(sessionDetails.isLockMinRate()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.isLockTargetRate()))) { transferSpec.setLock_target_rate(sessionDetails.isLockTargetRate()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.isLockRatePolicy()))) { transferSpec.setLock_rate_policy(sessionDetails.isLockRatePolicy()); } if (!StringUtils.isNullOrEmpty(sessionDetails.getDestinationRoot())) { transferSpec.setDestination_root(sessionDetails.getDestinationRoot()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getMultiSession()))) { transferSpec.setMulti_session(sessionDetails.getMultiSession()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getMultiSessionThreshold()))) { transferSpec.setMulti_session_threshold(sessionDetails.getMultiSessionThreshold()); } } }
AsperaTransferManager { public void modifyTransferSpec(AsperaConfig sessionDetails, TransferSpecs transferSpecs) { for(TransferSpec transferSpec : transferSpecs.transfer_specs) { if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getTargetRateKbps()))) { transferSpec.setTarget_rate_kbps(sessionDetails.getTargetRateKbps()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getTargetRateCapKbps()))) { transferSpec.setTarget_rate_cap_kbps(sessionDetails.getTargetRateCapKbps()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getMinRateCapKbps()))) { transferSpec.setMin_rate_cap_kbps(sessionDetails.getMinRateCapKbps()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getMinRateKbps()))) { transferSpec.setMin_rate_kbps(sessionDetails.getMinRateKbps()); } if (!StringUtils.isNullOrEmpty(sessionDetails.getRatePolicy())) { transferSpec.setRate_policy(sessionDetails.getRatePolicy()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.isLockMinRate()))) { transferSpec.setLock_min_rate(sessionDetails.isLockMinRate()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.isLockTargetRate()))) { transferSpec.setLock_target_rate(sessionDetails.isLockTargetRate()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.isLockRatePolicy()))) { transferSpec.setLock_rate_policy(sessionDetails.isLockRatePolicy()); } if (!StringUtils.isNullOrEmpty(sessionDetails.getDestinationRoot())) { transferSpec.setDestination_root(sessionDetails.getDestinationRoot()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getMultiSession()))) { transferSpec.setMulti_session(sessionDetails.getMultiSession()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getMultiSessionThreshold()))) { transferSpec.setMulti_session_threshold(sessionDetails.getMultiSessionThreshold()); } } } }
AsperaTransferManager { public void modifyTransferSpec(AsperaConfig sessionDetails, TransferSpecs transferSpecs) { for(TransferSpec transferSpec : transferSpecs.transfer_specs) { if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getTargetRateKbps()))) { transferSpec.setTarget_rate_kbps(sessionDetails.getTargetRateKbps()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getTargetRateCapKbps()))) { transferSpec.setTarget_rate_cap_kbps(sessionDetails.getTargetRateCapKbps()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getMinRateCapKbps()))) { transferSpec.setMin_rate_cap_kbps(sessionDetails.getMinRateCapKbps()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getMinRateKbps()))) { transferSpec.setMin_rate_kbps(sessionDetails.getMinRateKbps()); } if (!StringUtils.isNullOrEmpty(sessionDetails.getRatePolicy())) { transferSpec.setRate_policy(sessionDetails.getRatePolicy()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.isLockMinRate()))) { transferSpec.setLock_min_rate(sessionDetails.isLockMinRate()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.isLockTargetRate()))) { transferSpec.setLock_target_rate(sessionDetails.isLockTargetRate()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.isLockRatePolicy()))) { transferSpec.setLock_rate_policy(sessionDetails.isLockRatePolicy()); } if (!StringUtils.isNullOrEmpty(sessionDetails.getDestinationRoot())) { transferSpec.setDestination_root(sessionDetails.getDestinationRoot()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getMultiSession()))) { transferSpec.setMulti_session(sessionDetails.getMultiSession()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getMultiSessionThreshold()))) { transferSpec.setMulti_session_threshold(sessionDetails.getMultiSessionThreshold()); } } } protected  AsperaTransferManager(AmazonS3 s3Client, TokenManager tokenManager, AsperaConfig asperaConfig, 
			AsperaTransferManagerConfig asperaTransferManagerConfig); }
AsperaTransferManager { public void modifyTransferSpec(AsperaConfig sessionDetails, TransferSpecs transferSpecs) { for(TransferSpec transferSpec : transferSpecs.transfer_specs) { if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getTargetRateKbps()))) { transferSpec.setTarget_rate_kbps(sessionDetails.getTargetRateKbps()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getTargetRateCapKbps()))) { transferSpec.setTarget_rate_cap_kbps(sessionDetails.getTargetRateCapKbps()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getMinRateCapKbps()))) { transferSpec.setMin_rate_cap_kbps(sessionDetails.getMinRateCapKbps()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getMinRateKbps()))) { transferSpec.setMin_rate_kbps(sessionDetails.getMinRateKbps()); } if (!StringUtils.isNullOrEmpty(sessionDetails.getRatePolicy())) { transferSpec.setRate_policy(sessionDetails.getRatePolicy()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.isLockMinRate()))) { transferSpec.setLock_min_rate(sessionDetails.isLockMinRate()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.isLockTargetRate()))) { transferSpec.setLock_target_rate(sessionDetails.isLockTargetRate()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.isLockRatePolicy()))) { transferSpec.setLock_rate_policy(sessionDetails.isLockRatePolicy()); } if (!StringUtils.isNullOrEmpty(sessionDetails.getDestinationRoot())) { transferSpec.setDestination_root(sessionDetails.getDestinationRoot()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getMultiSession()))) { transferSpec.setMulti_session(sessionDetails.getMultiSession()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getMultiSessionThreshold()))) { transferSpec.setMulti_session_threshold(sessionDetails.getMultiSessionThreshold()); } } } protected  AsperaTransferManager(AmazonS3 s3Client, TokenManager tokenManager, AsperaConfig asperaConfig, 
			AsperaTransferManagerConfig asperaTransferManagerConfig); Future<AsperaTransaction> upload(String bucket, File localFileName, String remoteFileName); Future<AsperaTransaction> upload(String bucket, File localFileName, String remoteFileName, AsperaConfig sessionDetails, ProgressListener progressListener); Future<AsperaTransaction> download(String bucket, File localFileName, String remoteFileName); 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); Future<AsperaTransaction> uploadDirectory(String bucketName, String virtualDirectoryKeyPrefix, File directory,
			boolean includeSubdirectories); Future<AsperaTransaction> uploadDirectory(String bucketName, String virtualDirectoryKeyPrefix, File directory,
			boolean includeSubdirectories, AsperaConfig sessionDetails, ProgressListener progressListener); AsperaTransaction processTransfer(String transferSpecStr, String bucketName, String key, String fileName, ProgressListener progressListener); FASPConnectionInfo getFaspConnectionInfo(String bucketName); TransferSpecs getTransferSpec(FASPConnectionInfo faspConnectionInfo, String localFileName, String remoteFileName, String direction); void checkMultiSessionAllGlobalConfig(TransferSpecs transferSpecs); void modifyTransferSpec(AsperaConfig sessionDetails, TransferSpecs transferSpecs); void excludeSubdirectories(File directory, TransferSpecs transferSpecs); void shutdownThreadPools(); }
AsperaTransferManager { public void modifyTransferSpec(AsperaConfig sessionDetails, TransferSpecs transferSpecs) { for(TransferSpec transferSpec : transferSpecs.transfer_specs) { if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getTargetRateKbps()))) { transferSpec.setTarget_rate_kbps(sessionDetails.getTargetRateKbps()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getTargetRateCapKbps()))) { transferSpec.setTarget_rate_cap_kbps(sessionDetails.getTargetRateCapKbps()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getMinRateCapKbps()))) { transferSpec.setMin_rate_cap_kbps(sessionDetails.getMinRateCapKbps()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getMinRateKbps()))) { transferSpec.setMin_rate_kbps(sessionDetails.getMinRateKbps()); } if (!StringUtils.isNullOrEmpty(sessionDetails.getRatePolicy())) { transferSpec.setRate_policy(sessionDetails.getRatePolicy()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.isLockMinRate()))) { transferSpec.setLock_min_rate(sessionDetails.isLockMinRate()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.isLockTargetRate()))) { transferSpec.setLock_target_rate(sessionDetails.isLockTargetRate()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.isLockRatePolicy()))) { transferSpec.setLock_rate_policy(sessionDetails.isLockRatePolicy()); } if (!StringUtils.isNullOrEmpty(sessionDetails.getDestinationRoot())) { transferSpec.setDestination_root(sessionDetails.getDestinationRoot()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getMultiSession()))) { transferSpec.setMulti_session(sessionDetails.getMultiSession()); } if (!StringUtils.isNullOrEmpty(String.valueOf(sessionDetails.getMultiSessionThreshold()))) { transferSpec.setMulti_session_threshold(sessionDetails.getMultiSessionThreshold()); } } } protected  AsperaTransferManager(AmazonS3 s3Client, TokenManager tokenManager, AsperaConfig asperaConfig, 
			AsperaTransferManagerConfig asperaTransferManagerConfig); Future<AsperaTransaction> upload(String bucket, File localFileName, String remoteFileName); Future<AsperaTransaction> upload(String bucket, File localFileName, String remoteFileName, AsperaConfig sessionDetails, ProgressListener progressListener); Future<AsperaTransaction> download(String bucket, File localFileName, String remoteFileName); 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); Future<AsperaTransaction> uploadDirectory(String bucketName, String virtualDirectoryKeyPrefix, File directory,
			boolean includeSubdirectories); Future<AsperaTransaction> uploadDirectory(String bucketName, String virtualDirectoryKeyPrefix, File directory,
			boolean includeSubdirectories, AsperaConfig sessionDetails, ProgressListener progressListener); AsperaTransaction processTransfer(String transferSpecStr, String bucketName, String key, String fileName, ProgressListener progressListener); FASPConnectionInfo getFaspConnectionInfo(String bucketName); TransferSpecs getTransferSpec(FASPConnectionInfo faspConnectionInfo, String localFileName, String remoteFileName, String direction); void checkMultiSessionAllGlobalConfig(TransferSpecs transferSpecs); void modifyTransferSpec(AsperaConfig sessionDetails, TransferSpecs transferSpecs); void excludeSubdirectories(File directory, TransferSpecs transferSpecs); void shutdownThreadPools();  }