{
EPR epr = ListenerUtil.assembleEpr(config);
if (epr instanceof FTPEpr) {
FTPEpr ftpEpr = (FTPEpr) epr;
RemoteFileSystem rfs = RemoteFileSystemFactory.getRemoteFileSystem(ftpEpr, true);
rfs.quit();
} else {
throw new GatewayException("This Gateway only accepts FTP and SFTP.");
}
}
catch (RemoteFileSystemException ex)