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 2019/12/03 09:35:14 UTC
[camel] branch master updated: CAMEL-14232: Updated some ftp
options with better documentation.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new d8292a9 CAMEL-14232: Updated some ftp options with better documentation.
d8292a9 is described below
commit d8292a95a49c9eede28d2ee752367be43a9b59f7
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Dec 3 10:34:57 2019 +0100
CAMEL-14232: Updated some ftp options with better documentation.
---
.../camel-ftp/src/main/docs/sftp-component.adoc | 4 +-
.../component/file/remote/SftpConfiguration.java | 8 +++-
.../endpoint/dsl/SftpEndpointBuilderFactory.java | 54 +++++++++++++++++-----
.../modules/ROOT/pages/sftp-component.adoc | 4 +-
4 files changed, 52 insertions(+), 18 deletions(-)
diff --git a/components/camel-ftp/src/main/docs/sftp-component.adoc b/components/camel-ftp/src/main/docs/sftp-component.adoc
index af1eef6..066bca8 100644
--- a/components/camel-ftp/src/main/docs/sftp-component.adoc
+++ b/components/camel-ftp/src/main/docs/sftp-component.adoc
@@ -120,8 +120,8 @@ with the following path and query parameters:
| *maximumReconnectAttempts* (advanced) | Specifies the maximum reconnect attempts Camel performs when it tries to connect to the remote FTP server. Use 0 to disable this behavior. | | int
| *proxy* (advanced) | To use a custom configured com.jcraft.jsch.Proxy. This proxy is used to consume/send messages from the target SFTP host. | | Proxy
| *reconnectDelay* (advanced) | Delay in millis Camel will wait before performing a reconnect attempt. | | long
-| *serverAliveCountMax* (advanced) | Allows you to set the serverAliveCountMax of the \sftp session | 1 | int
-| *serverAliveInterval* (advanced) | Allows you to set the serverAliveInterval of the \sftp session | | int
+| *serverAliveCountMax* (advanced) | Sets the number of keep-alive messages which may be sent without receiving any messages back from the server. If this threshold is reached while keep-alive messages are being sent, the connection will be disconnected. The default value is one. | 1 | int
+| *serverAliveInterval* (advanced) | Sets the interval (millis) to send a keep-alive message. If zero is specified, any keep-alive message must not be sent. The default interval is zero. | | int
| *soTimeout* (advanced) | Sets the so timeout FTP and FTPS Only for Camel 2.4. SFTP for Camel 2.14.3/2.15.3/2.16 onwards. Is the SocketOptions.SO_TIMEOUT value in millis. Recommended option is to set this to 300000 so as not have a hanged connection. On SFTP this option is set as timeout on the JSCH Session instance. | 300000 | int
| *stepwise* (advanced) | Sets whether we should stepwise change directories while traversing file structures when downloading files, or as well when uploading a file to a directory. You can disable this if you for example are in a situation where you cannot change directory on the FTP server due security reasons. | true | boolean
| *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConfiguration.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConfiguration.java
index 9698216..d8f04d2 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConfiguration.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConfiguration.java
@@ -206,7 +206,8 @@ public class SftpConfiguration extends RemoteFileConfiguration {
}
/**
- * Allows you to set the serverAliveInterval of the sftp session
+ * Sets the interval (millis) to send a keep-alive message. If zero is
+ * specified, any keep-alive message must not be sent. The default interval is zero.
*/
public void setServerAliveInterval(int serverAliveInterval) {
this.serverAliveInterval = serverAliveInterval;
@@ -217,7 +218,10 @@ public class SftpConfiguration extends RemoteFileConfiguration {
}
/**
- * Allows you to set the serverAliveCountMax of the sftp session
+ * Sets the number of keep-alive messages which may be sent without
+ * receiving any messages back from the server. If this threshold is
+ * reached while keep-alive messages are being sent, the connection will
+ * be disconnected. The default value is one.
*/
public void setServerAliveCountMax(int serverAliveCountMax) {
this.serverAliveCountMax = serverAliveCountMax;
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/SftpEndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/SftpEndpointBuilderFactory.java
index 9d5ec97..d2068ab 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/SftpEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/SftpEndpointBuilderFactory.java
@@ -2650,7 +2650,10 @@ public interface SftpEndpointBuilderFactory {
return this;
}
/**
- * Allows you to set the serverAliveCountMax of the sftp session.
+ * Sets the number of keep-alive messages which may be sent without
+ * receiving any messages back from the server. If this threshold is
+ * reached while keep-alive messages are being sent, the connection will
+ * be disconnected. The default value is one.
*
* The option is a: <code>int</code> type.
*
@@ -2662,7 +2665,10 @@ public interface SftpEndpointBuilderFactory {
return this;
}
/**
- * Allows you to set the serverAliveCountMax of the sftp session.
+ * Sets the number of keep-alive messages which may be sent without
+ * receiving any messages back from the server. If this threshold is
+ * reached while keep-alive messages are being sent, the connection will
+ * be disconnected. The default value is one.
*
* The option will be converted to a <code>int</code> type.
*
@@ -2674,7 +2680,9 @@ public interface SftpEndpointBuilderFactory {
return this;
}
/**
- * Allows you to set the serverAliveInterval of the sftp session.
+ * Sets the interval (millis) to send a keep-alive message. If zero is
+ * specified, any keep-alive message must not be sent. The default
+ * interval is zero.
*
* The option is a: <code>int</code> type.
*
@@ -2686,7 +2694,9 @@ public interface SftpEndpointBuilderFactory {
return this;
}
/**
- * Allows you to set the serverAliveInterval of the sftp session.
+ * Sets the interval (millis) to send a keep-alive message. If zero is
+ * specified, any keep-alive message must not be sent. The default
+ * interval is zero.
*
* The option will be converted to a <code>int</code> type.
*
@@ -3987,7 +3997,10 @@ public interface SftpEndpointBuilderFactory {
return this;
}
/**
- * Allows you to set the serverAliveCountMax of the sftp session.
+ * Sets the number of keep-alive messages which may be sent without
+ * receiving any messages back from the server. If this threshold is
+ * reached while keep-alive messages are being sent, the connection will
+ * be disconnected. The default value is one.
*
* The option is a: <code>int</code> type.
*
@@ -3999,7 +4012,10 @@ public interface SftpEndpointBuilderFactory {
return this;
}
/**
- * Allows you to set the serverAliveCountMax of the sftp session.
+ * Sets the number of keep-alive messages which may be sent without
+ * receiving any messages back from the server. If this threshold is
+ * reached while keep-alive messages are being sent, the connection will
+ * be disconnected. The default value is one.
*
* The option will be converted to a <code>int</code> type.
*
@@ -4011,7 +4027,9 @@ public interface SftpEndpointBuilderFactory {
return this;
}
/**
- * Allows you to set the serverAliveInterval of the sftp session.
+ * Sets the interval (millis) to send a keep-alive message. If zero is
+ * specified, any keep-alive message must not be sent. The default
+ * interval is zero.
*
* The option is a: <code>int</code> type.
*
@@ -4023,7 +4041,9 @@ public interface SftpEndpointBuilderFactory {
return this;
}
/**
- * Allows you to set the serverAliveInterval of the sftp session.
+ * Sets the interval (millis) to send a keep-alive message. If zero is
+ * specified, any keep-alive message must not be sent. The default
+ * interval is zero.
*
* The option will be converted to a <code>int</code> type.
*
@@ -4850,7 +4870,10 @@ public interface SftpEndpointBuilderFactory {
return this;
}
/**
- * Allows you to set the serverAliveCountMax of the sftp session.
+ * Sets the number of keep-alive messages which may be sent without
+ * receiving any messages back from the server. If this threshold is
+ * reached while keep-alive messages are being sent, the connection will
+ * be disconnected. The default value is one.
*
* The option is a: <code>int</code> type.
*
@@ -4862,7 +4885,10 @@ public interface SftpEndpointBuilderFactory {
return this;
}
/**
- * Allows you to set the serverAliveCountMax of the sftp session.
+ * Sets the number of keep-alive messages which may be sent without
+ * receiving any messages back from the server. If this threshold is
+ * reached while keep-alive messages are being sent, the connection will
+ * be disconnected. The default value is one.
*
* The option will be converted to a <code>int</code> type.
*
@@ -4874,7 +4900,9 @@ public interface SftpEndpointBuilderFactory {
return this;
}
/**
- * Allows you to set the serverAliveInterval of the sftp session.
+ * Sets the interval (millis) to send a keep-alive message. If zero is
+ * specified, any keep-alive message must not be sent. The default
+ * interval is zero.
*
* The option is a: <code>int</code> type.
*
@@ -4886,7 +4914,9 @@ public interface SftpEndpointBuilderFactory {
return this;
}
/**
- * Allows you to set the serverAliveInterval of the sftp session.
+ * Sets the interval (millis) to send a keep-alive message. If zero is
+ * specified, any keep-alive message must not be sent. The default
+ * interval is zero.
*
* The option will be converted to a <code>int</code> type.
*
diff --git a/docs/components/modules/ROOT/pages/sftp-component.adoc b/docs/components/modules/ROOT/pages/sftp-component.adoc
index a0cdbbd..c1ec635 100644
--- a/docs/components/modules/ROOT/pages/sftp-component.adoc
+++ b/docs/components/modules/ROOT/pages/sftp-component.adoc
@@ -121,8 +121,8 @@ with the following path and query parameters:
| *maximumReconnectAttempts* (advanced) | Specifies the maximum reconnect attempts Camel performs when it tries to connect to the remote FTP server. Use 0 to disable this behavior. | | int
| *proxy* (advanced) | To use a custom configured com.jcraft.jsch.Proxy. This proxy is used to consume/send messages from the target SFTP host. | | Proxy
| *reconnectDelay* (advanced) | Delay in millis Camel will wait before performing a reconnect attempt. | | long
-| *serverAliveCountMax* (advanced) | Allows you to set the serverAliveCountMax of the \sftp session | 1 | int
-| *serverAliveInterval* (advanced) | Allows you to set the serverAliveInterval of the \sftp session | | int
+| *serverAliveCountMax* (advanced) | Sets the number of keep-alive messages which may be sent without receiving any messages back from the server. If this threshold is reached while keep-alive messages are being sent, the connection will be disconnected. The default value is one. | 1 | int
+| *serverAliveInterval* (advanced) | Sets the interval (millis) to send a keep-alive message. If zero is specified, any keep-alive message must not be sent. The default interval is zero. | | int
| *soTimeout* (advanced) | Sets the so timeout FTP and FTPS Only for Camel 2.4. SFTP for Camel 2.14.3/2.15.3/2.16 onwards. Is the SocketOptions.SO_TIMEOUT value in millis. Recommended option is to set this to 300000 so as not have a hanged connection. On SFTP this option is set as timeout on the JSCH Session instance. | 300000 | int
| *stepwise* (advanced) | Sets whether we should stepwise change directories while traversing file structures when downloading files, or as well when uploading a file to a directory. You can disable this if you for example are in a situation where you cannot change directory on the FTP server due security reasons. | true | boolean
| *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean