List of usage examples for org.apache.commons.net.ftp FTPSClient FTPSClient
public FTPSClient(boolean isImplicit, SSLContext context)
From source file:org.apache.maven.wagon.providers.ftp.FtpsWagon.java
@Override protected FTPClient createClient() { LOG.debug("Creating secure FTP client. Protocol: [{}], implicit mode: [{}], endpoint checking: [{}].", securityProtocol, implicit, endpointChecking); FTPSClient client = new FTPSClient(securityProtocol, implicit); client.setEndpointCheckingEnabled(endpointChecking); return client; }
From source file:org.springframework.integration.ftp.session.DefaultFtpsSessionFactory.java
@Override protected FTPSClient createClientInstance() { try {/*from w w w .ja v a 2s.c o m*/ if (StringUtils.hasText(this.protocol)) { return new FTPSClient(this.protocol, this.implicit); } return new FTPSClient(this.implicit); } catch (Exception e) { /* This catch block is technically not necessary but it allows users to use the older Commons Net 2.0 if necessary, which requires you to catch a NoSuchAlgorithmException. */ if (e instanceof RuntimeException) { throw (RuntimeException) e; } throw new RuntimeException("Failed to create FTPS client.", e); } }
From source file:org.teiid.resource.adapter.ftp.FtpManagedConnectionFactory.java
private FTPClient createClientInstance() { if (this.isFtps) { if (this.getProtocol() != null) { return new FTPSClient(this.protocol, this.implicit); }/*from w w w .j a v a2 s. c o m*/ return new FTPSClient(this.implicit); } return new FTPClient(); }