java/automation/src/main/java/be/bosa/dt/best/automation/services/TransferService.java
/**
	 * Download data file via SFTP (typically from BOSA "Managed File Transfer" service) and save it to a local file.
	 *
	 * @param remote remote location of the file
	 * @param local local name of zip file
	 * @throws IOException 
	 */
Download data file via SFTP (typically from BOSA "Managed File Transfer" service) and save it to a local file.

@param remote remote location of the file
@param local local name of zip file
@throws IOException
Download data file via SFTP ( typically from BOSA " Managed File Transfer " service ) and save it to a local file . @param remote remote location of the file @param local local name of zip file @throws IOException
@Retry(retryOn = Exception.class, maxRetries = 3, delay = 2000)
	public void download(String remote, String local) throws IOException {
		SSHClient client = new SSHClient();
		client.addHostKeyVerifier(new PromiscuousVerifier());
		client.connect(mftServer, mftPort);
		client.authPassword(mftUser, mftPass);
		try (SFTPClient sftp = client.newSFTPClient()) {
			sftp.get(remote, local);
		} finally {
			client.disconnect();
		}
	}
@ Retry ( retryOn = Exception . class , maxRetries = 3 , delay = 2000 ) public void download ( String remote , String local ) throws IOException { SSHClient client = new SSHClient ( ) ; client . addHostKeyVerifier ( new PromiscuousVerifier ( ) ) ; client . connect ( mftServer , mftPort ) ; client . authPassword ( mftUser , mftPass ) ; try ( SFTPClient sftp = client . newSFTPClient ( ) ) { sftp . get ( remote , local ) ; } finally { client . disconnect ( ) ; } }
Download data file via SFTP (typically from BOSA "Managed File Transfer" service) and save it to a local file.
Download data file via SFTP ( typically from BOSA " Managed File Transfer " service ) and save it to a local file .