servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r526151 - /incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FTPClientPool.java
Date Fri, 06 Apr 2007 13:18:11 GMT
Author: gnodet
Date: Fri Apr  6 06:18:11 2007
New Revision: 526151

URL: http://svn.apache.org/viewvc?view=rev&rev=526151
Log:
SM-921: FTPClientPool does not have dataTimeout and controlEncoding properties

Modified:
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FTPClientPool.java

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FTPClientPool.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FTPClientPool.java?view=diff&rev=526151&r1=526150&r2=526151
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FTPClientPool.java
(original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FTPClientPool.java
Fri Apr  6 06:18:11 2007
@@ -33,11 +33,16 @@
  */
 public class FTPClientPool extends SocketClientPoolSupport {
 
+    public static final int DEFAULT_DATA_TIMEOUT = -1;
+    public static final String DEFAULT_CONTROL_ENCODING = FTP.DEFAULT_CONTROL_ENCODING;
+
     private String username;
     private String password;
     private boolean binaryMode = true;
     private boolean passiveMode = false;
     private FTPClientConfig config;
+    private String controlEncoding = DEFAULT_CONTROL_ENCODING;
+    private int dataTimeout = DEFAULT_DATA_TIMEOUT;
 
     public boolean validateObject(Object object) {
         FTPClient client = (FTPClient) object;
@@ -107,6 +112,34 @@
         this.config = config;
     }
 
+    /**
+     * @return the controlEncoding
+     */
+    public String getControlEncoding() {
+        return controlEncoding;
+    }
+
+    /**
+     * @param controlEncoding the controlEncoding to set
+     */
+    public void setControlEncoding(String controlEncoding) {
+        this.controlEncoding = controlEncoding;
+    }
+
+    /**
+     * @return the dataTimeout
+     */
+    public int getDataTimeout() {
+        return dataTimeout;
+    }
+
+    /**
+     * @param dataTimeout the dataTimeout to set
+     */
+    public void setDataTimeout(int dataTimeout) {
+        this.dataTimeout = dataTimeout;
+    }
+
     // Implementation methods
     //-------------------------------------------------------------------------
     protected void connect(SocketClient client) throws Exception {
@@ -115,7 +148,10 @@
         if (config != null) {
             ftp.configure(config);
         }
-        super.connect(client);
+        ftp.setDataTimeout(getDataTimeout());
+        ftp.setControlEncoding(getControlEncoding());
+
+        super.connect(ftp);
 
         int code = ftp.getReplyCode();
         if (!FTPReply.isPositiveCompletion(code)) {



Mime
View raw message