You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/06/14 13:02:47 UTC

[2/5] camel git commit: Component docs

Component docs


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/08c850e0
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/08c850e0
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/08c850e0

Branch: refs/heads/master
Commit: 08c850e0e7a1f0a094731f063f9a9d2f7cdd81b2
Parents: 1e1e1f9
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Jun 14 10:15:20 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Jun 14 13:08:07 2015 +0200

----------------------------------------------------------------------
 .../component/file/remote/FtpEndpoint.java      | 15 ++++++++++---
 .../file/remote/RemoteFileConfiguration.java    |  3 +++
 .../file/remote/RemoteFileEndpoint.java         | 23 ++++++++++++++++++++
 3 files changed, 38 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/08c850e0/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
index 24a0d82..15ea641 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
@@ -199,14 +199,23 @@ public class FtpEndpoint<T extends FTPFile> extends RemoteFileEndpoint<FTPFile>
     }
 
     /**
-     * Sets the soTimeout option.
-     * <p/>
-     * Used by FTPClient
+     * Sets the soTimeout on the FTP client.
      */
     public void setSoTimeout(int soTimeout) {
         this.soTimeout = soTimeout;
     }
 
+    public int getDataTimeout() {
+        return dataTimeout;
+    }
+
+    /**
+     * Sets the data timeout on the FTP client.
+     */
+    public void setDataTimeout(int dataTimeout) {
+        this.dataTimeout = dataTimeout;
+    }
+
     @Override
     public char getFileSeparator() {
         // the regular ftp component should use the configured separator

http://git-wip-us.apache.org/repos/asf/camel/blob/08c850e0/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConfiguration.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConfiguration.java
index 9ced8f4..0f867b2 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConfiguration.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConfiguration.java
@@ -201,6 +201,9 @@ public abstract class RemoteFileConfiguration extends GenericFileConfiguration {
         return binary;
     }
 
+    /**
+     * Specifies the file transfer mode, BINARY or ASCII. Default is ASCII (false).
+     */
     public void setBinary(boolean binary) {
         this.binary = binary;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/08c850e0/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
index 97a310d..08a3808 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
@@ -183,6 +183,9 @@ public abstract class RemoteFileEndpoint<T> extends GenericFileEndpoint<T> {
         return maximumReconnectAttempts;
     }
 
+    /**
+     * Specifies the maximum reconnect attempts Camel performs when it tries to connect to the remote FTP server. Use 0 to disable this behavior.
+     */
     public void setMaximumReconnectAttempts(int maximumReconnectAttempts) {
         this.maximumReconnectAttempts = maximumReconnectAttempts;
     }
@@ -191,6 +194,9 @@ public abstract class RemoteFileEndpoint<T> extends GenericFileEndpoint<T> {
         return reconnectDelay;
     }
 
+    /**
+     * Delay in millis Camel will wait before performing a reconnect attempt.
+     */
     public void setReconnectDelay(long reconnectDelay) {
         this.reconnectDelay = reconnectDelay;
     }
@@ -199,6 +205,11 @@ public abstract class RemoteFileEndpoint<T> extends GenericFileEndpoint<T> {
         return disconnect;
     }
 
+    /**
+     * Whether or not to disconnect from remote FTP server right after use.
+     * Disconnect will only disconnect the current connection to the FTP server.
+     * If you have a consumer which you want to stop, then you need to stop the consumer/route instead.
+     */
     public void setDisconnect(boolean disconnect) {
         this.disconnect = disconnect;
     }
@@ -207,6 +218,13 @@ public abstract class RemoteFileEndpoint<T> extends GenericFileEndpoint<T> {
         return fastExistsCheck;
     }
 
+    /**
+     * If set this option to be true, camel-ftp will use the list file directly to check if the file exists.
+     * Since some FTP server may not support to list the file directly, if the option is false,
+     * camel-ftp will use the old way to list the directory and check if the file exists.
+     * This option also influences readLock=changed to control whether it performs a fast check to update file information or not.
+     * This can be used to speed up the process if the FTP server has a lot of files.
+     */
     public void setFastExistsCheck(boolean fastExistsCheck) {
         this.fastExistsCheck = fastExistsCheck;
     }
@@ -215,6 +233,11 @@ public abstract class RemoteFileEndpoint<T> extends GenericFileEndpoint<T> {
         return this.download;
     }
 
+    /**
+     * Whether the FTP consumer should download the file.
+     * If this option is set to false, then the message body will be null, but the consumer will still trigger a Camel
+     * Exchange that has details about the file such as file name, file size, etc. It's just that the file will not be downloaded.
+     */
     public void setDownload(boolean download) {
         this.download = download;
     }