List of usage examples for org.apache.commons.net.ftp FTPClient setConnectTimeout
public void setConnectTimeout(int connectTimeout)
From source file:org.teiid.resource.adapter.ftp.FtpManagedConnectionFactory.java
private void beforeConnectProcessing(FTPClient client) throws IOException { client.configure(this.config); if (this.connectTimeout != null) { client.setConnectTimeout(this.connectTimeout); }/* w ww. j a v a 2 s . co m*/ if (this.defaultTimeout != null) { client.setDefaultTimeout(this.defaultTimeout); } if (this.dataTimeout != null) { client.setDataTimeout(this.dataTimeout); } client.setControlEncoding(this.controlEncoding); if (this.isFtps) { FTPSClient ftpsClient = (FTPSClient) client; ftpsClient.execPBSZ(0); ftpsClient.execPROT(this.execProt); } }