You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2014/08/07 19:24:21 UTC
svn commit: r1616552 - in /commons/proper/net/trunk/src: changes/changes.xml
main/java/org/apache/commons/net/ftp/FTPClient.java
Author: sebb
Date: Thu Aug 7 17:24:20 2014
New Revision: 1616552
URL: http://svn.apache.org/r1616552
Log:
NET-547 There is a lack of documentation regarding setControlKeepAliveTimeout
Modified:
commons/proper/net/trunk/src/changes/changes.xml
commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java
Modified: commons/proper/net/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/changes/changes.xml?rev=1616552&r1=1616551&r2=1616552&view=diff
==============================================================================
--- commons/proper/net/trunk/src/changes/changes.xml [utf-8] (original)
+++ commons/proper/net/trunk/src/changes/changes.xml [utf-8] Thu Aug 7 17:24:20 2014
@@ -68,6 +68,9 @@ This is mainly a bug-fix release. See fu
IMAPExportMbox (example app) allows IMAP folders to be exported into an mbox file.
This is the inverse of the IMAPImportMbox example added previously
">
+ <action issue="NET-547" type="fix" dev="sebb" due-to="Fabio Scippacercola">
+ There is a lack of documentation regarding setControlKeepAliveTimeout
+ </action>
<action issue="NET-549" type="fix" dev="sebb" due-to="Pradeep Natarajan">
Telnet does not convert LF to CRLF in ASCII mode
</action>
Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java?rev=1616552&r1=1616551&r2=1616552&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java Thu Aug 7 17:24:20 2014
@@ -239,7 +239,12 @@ import org.apache.commons.net.io.Util;
* as in Ant</li>
* </ul>see {@link FTPClientConfig FTPClientConfig}.
* <p>
- * <b>Control channel keep-alive feature</b>:<br>
+ * <b>Control channel keep-alive feature</b>:
+ * <p>
+ * <b>Please note:</b> this does not apply to the methods where the user is responsible for writing or reading
+ * the data stream, i.e. {@link #retrieveFileStream(String)} , {@link #storeFileStream(String)}
+ * and the other xxxFileStream methods
+ * <p>
* During file transfers, the data connection is busy, but the control connection is idle.
* FTP servers know that the control connection is in use, so won't close it through lack of activity,
* but it's a lot harder for network routers to know that the control and data connections are associated
@@ -253,15 +258,23 @@ import org.apache.commons.net.io.Util;
* ftpClient.setControlKeepAliveTimeout(300); // set timeout to 5 minutes
* </pre>
* This will cause the file upload/download methods to send a NOOP approximately every 5 minutes.
+ * The following public methods support this:
+ * <ul>
+ * <li>{@link #retrieveFile(String, OutputStream)}</li>
+ * <li>{@link #appendFile(String, InputStream)}</li>
+ * <li>{@link #storeFile(String, InputStream)}</li>
+ * <li>{@link #storeUniqueFile(InputStream)}</li>
+ * <li>{@link #storeUniqueFileStream(String)}</li>
+ * </ul>
+ * This feature does not apply to the methods where the user is responsible for writing or reading
+ * the data stream, i.e. {@link #retrieveFileStream(String)} , {@link #storeFileStream(String)}
+ * and the other xxxFileStream methods.
+ * In such cases, the user is responsible for keeping the control connection alive if necessary.
* <p>
* The implementation currently uses a {@link CopyStreamListener} which is passed to the
* {@link Util#copyStream(InputStream, OutputStream, int, long, CopyStreamListener, boolean)}
* method, so the timing is partially dependent on how long each block transfer takes.
* <p>
- * <b>Note:</b> this does not apply to the methods where the user is responsible for writing or reading
- * the data stream, i.e. {@link #retrieveFileStream(String)} , {@link #storeFileStream(String)}
- * and the other xxxFileStream methods
- * <p>
*
* @see #FTP_SYSTEM_TYPE
* @see #SYSTEM_TYPE_PROPERTIES