protected FTPClient createFTP() throws IOException, JMSException { String connectUrl = url.getHost(); setUserInformation(url.getUserInfo()); int port = url.getPort() < 1 ? 21 : url.getPort(); FTPClient ftp = new FTPClient(); try { ftp.connect(connectUrl, port); } catch(ConnectException e) { throw new JMSException("Problem connecting the FTP-server"); } if(!ftp.login(ftpUser, ftpPass)) { ftp.quit(); ftp.disconnect(); throw new JMSException("Cant Authentificate to FTP-Server"); } return ftp; }
protected FTPClient createFTP() throws IOException, JMSException { String connectUrl = url.getHost(); setUserInformation(url.getUserInfo()); int port = url.getPort() < 1 ? 21 : url.getPort(); FTPClient ftp = new FTPClient(); try { ftp.connect(connectUrl, port); } catch(ConnectException e) { throw new JMSException("Problem connecting the FTP-server"); } if(!ftp.login(ftpUser, ftpPass)) { ftp.quit(); ftp.disconnect(); throw new JMSException("Cant Authentificate to FTP-Server"); } return ftp; }
protected FTPClient createFTP() throws IOException, JMSException { String connectUrl = url.getHost(); setUserInformation(url.getUserInfo()); int port = url.getPort() < 1 ? 21 : url.getPort(); FTPClient ftp = new FTPClient(); try { ftp.connect(connectUrl, port); } catch(ConnectException e) { throw new JMSException("Problem connecting the FTP-server"); } if(!ftp.login(ftpUser, ftpPass)) { ftp.quit(); ftp.disconnect(); throw new JMSException("Cant Authentificate to FTP-Server"); } return ftp; }
protected FTPClient createFTP() throws IOException, JMSException { String connectUrl = url.getHost(); setUserInformation(url.getUserInfo()); int port = url.getPort() < 1 ? 21 : url.getPort(); FTPClient ftp = new FTPClient(); try { ftp.connect(connectUrl, port); } catch(ConnectException e) { throw new JMSException("Problem connecting the FTP-server"); } if(!ftp.login(ftpUser, ftpPass)) { ftp.quit(); ftp.disconnect(); throw new JMSException("Cant Authentificate to FTP-Server"); } return ftp; }
protected FTPClient createFTP() throws IOException, JMSException { String connectUrl = url.getHost(); setUserInformation(url.getUserInfo()); int port = url.getPort() < 1 ? 21 : url.getPort(); FTPClient ftp = new FTPClient(); try { ftp.connect(connectUrl, port); } catch(ConnectException e) { throw new JMSException("Problem connecting the FTP-server"); } if(!ftp.login(ftpUser, ftpPass)) { ftp.quit(); ftp.disconnect(); throw new JMSException("Cant Authentificate to FTP-Server"); } return ftp; }