diff --git a/components/camel-ftp/src/generated/java/org/apache/camel/component/file/remote/FtpEndpointConfigurer.java b/components/camel-ftp/src/generated/java/org/apache/camel/component/file/remote/FtpEndpointConfigurer.java index e9516f7767c7e..714f69812640f 100644 --- a/components/camel-ftp/src/generated/java/org/apache/camel/component/file/remote/FtpEndpointConfigurer.java +++ b/components/camel-ftp/src/generated/java/org/apache/camel/component/file/remote/FtpEndpointConfigurer.java @@ -196,7 +196,6 @@ public boolean configure(CamelContext camelContext, Object obj, String name, Obj case "stepwise": target.getConfiguration().setStepwise(property(camelContext, boolean.class, value)); return true; case "streamdownload": case "streamDownload": target.getConfiguration().setStreamDownload(property(camelContext, boolean.class, value)); return true; - case "synchronous": target.setSynchronous(property(camelContext, boolean.class, value)); return true; case "tempfilename": case "tempFileName": target.setTempFileName(property(camelContext, java.lang.String.class, value)); return true; case "tempprefix": @@ -399,7 +398,6 @@ public Class getOptionType(String name, boolean ignoreCase) { case "stepwise": return boolean.class; case "streamdownload": case "streamDownload": return boolean.class; - case "synchronous": return boolean.class; case "tempfilename": case "tempFileName": return java.lang.String.class; case "tempprefix": @@ -603,7 +601,6 @@ public Object getOptionValue(Object obj, String name, boolean ignoreCase) { case "stepwise": return target.getConfiguration().isStepwise(); case "streamdownload": case "streamDownload": return target.getConfiguration().isStreamDownload(); - case "synchronous": return target.isSynchronous(); case "tempfilename": case "tempFileName": return target.getTempFileName(); case "tempprefix": diff --git a/components/camel-ftp/src/generated/java/org/apache/camel/component/file/remote/FtpEndpointUriFactory.java b/components/camel-ftp/src/generated/java/org/apache/camel/component/file/remote/FtpEndpointUriFactory.java index 590bb5aa64bf9..0f023f3685006 100644 --- a/components/camel-ftp/src/generated/java/org/apache/camel/component/file/remote/FtpEndpointUriFactory.java +++ b/components/camel-ftp/src/generated/java/org/apache/camel/component/file/remote/FtpEndpointUriFactory.java @@ -20,11 +20,10 @@ public class FtpEndpointUriFactory extends org.apache.camel.support.component.En private static final Set PROPERTY_NAMES; private static final Set SECRET_PROPERTY_NAMES; static { - Set props = new HashSet<>(114); + Set props = new HashSet<>(113); props.add("disconnect"); props.add("moveExistingFileStrategy"); props.add("fileName"); - props.add("synchronous"); props.add("idempotent"); props.add("password"); props.add("preSort"); diff --git a/components/camel-ftp/src/generated/java/org/apache/camel/component/file/remote/FtpsEndpointUriFactory.java b/components/camel-ftp/src/generated/java/org/apache/camel/component/file/remote/FtpsEndpointUriFactory.java index 14b488289fa7b..e9ad9740299b2 100644 --- a/components/camel-ftp/src/generated/java/org/apache/camel/component/file/remote/FtpsEndpointUriFactory.java +++ b/components/camel-ftp/src/generated/java/org/apache/camel/component/file/remote/FtpsEndpointUriFactory.java @@ -20,11 +20,10 @@ public class FtpsEndpointUriFactory extends org.apache.camel.support.component.E private static final Set PROPERTY_NAMES; private static final Set SECRET_PROPERTY_NAMES; static { - Set props = new HashSet<>(122); + Set props = new HashSet<>(121); props.add("disconnect"); props.add("moveExistingFileStrategy"); props.add("fileName"); - props.add("synchronous"); props.add("idempotent"); props.add("password"); props.add("preSort"); diff --git a/components/camel-ftp/src/generated/java/org/apache/camel/component/file/remote/SftpEndpointConfigurer.java b/components/camel-ftp/src/generated/java/org/apache/camel/component/file/remote/SftpEndpointConfigurer.java index 2701c9adbc8e5..dddca4ae5b553 100644 --- a/components/camel-ftp/src/generated/java/org/apache/camel/component/file/remote/SftpEndpointConfigurer.java +++ b/components/camel-ftp/src/generated/java/org/apache/camel/component/file/remote/SftpEndpointConfigurer.java @@ -228,7 +228,6 @@ public boolean configure(CamelContext camelContext, Object obj, String name, Obj case "streamDownload": target.getConfiguration().setStreamDownload(property(camelContext, boolean.class, value)); return true; case "stricthostkeychecking": case "strictHostKeyChecking": target.getConfiguration().setStrictHostKeyChecking(property(camelContext, java.lang.String.class, value)); return true; - case "synchronous": target.setSynchronous(property(camelContext, boolean.class, value)); return true; case "tempfilename": case "tempFileName": target.setTempFileName(property(camelContext, java.lang.String.class, value)); return true; case "tempprefix": @@ -459,7 +458,6 @@ public Class getOptionType(String name, boolean ignoreCase) { case "streamDownload": return boolean.class; case "stricthostkeychecking": case "strictHostKeyChecking": return java.lang.String.class; - case "synchronous": return boolean.class; case "tempfilename": case "tempFileName": return java.lang.String.class; case "tempprefix": @@ -691,7 +689,6 @@ public Object getOptionValue(Object obj, String name, boolean ignoreCase) { case "streamDownload": return target.getConfiguration().isStreamDownload(); case "stricthostkeychecking": case "strictHostKeyChecking": return target.getConfiguration().getStrictHostKeyChecking(); - case "synchronous": return target.isSynchronous(); case "tempfilename": case "tempFileName": return target.getTempFileName(); case "tempprefix": diff --git a/components/camel-ftp/src/generated/java/org/apache/camel/component/file/remote/SftpEndpointUriFactory.java b/components/camel-ftp/src/generated/java/org/apache/camel/component/file/remote/SftpEndpointUriFactory.java index c432b7325715b..1dd925ee66a09 100644 --- a/components/camel-ftp/src/generated/java/org/apache/camel/component/file/remote/SftpEndpointUriFactory.java +++ b/components/camel-ftp/src/generated/java/org/apache/camel/component/file/remote/SftpEndpointUriFactory.java @@ -20,12 +20,11 @@ public class SftpEndpointUriFactory extends org.apache.camel.support.component.E private static final Set PROPERTY_NAMES; private static final Set SECRET_PROPERTY_NAMES; static { - Set props = new HashSet<>(129); + Set props = new HashSet<>(128); props.add("disconnect"); props.add("moveExistingFileStrategy"); props.add("fileName"); props.add("strictHostKeyChecking"); - props.add("synchronous"); props.add("idempotent"); props.add("password"); props.add("privateKeyPassphrase"); diff --git a/components/camel-ftp/src/generated/resources/org/apache/camel/component/file/remote/ftp.json b/components/camel-ftp/src/generated/resources/org/apache/camel/component/file/remote/ftp.json index 7304a2cab496a..02426efb4ba4e 100644 --- a/components/camel-ftp/src/generated/resources/org/apache/camel/component/file/remote/ftp.json +++ b/components/camel-ftp/src/generated/resources/org/apache/camel/component/file/remote/ftp.json @@ -91,7 +91,6 @@ "siteCommand": { "kind": "parameter", "displayName": "Site Command", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.file.remote.FtpConfiguration", "configurationField": "configuration", "description": "Sets optional site command(s) to be executed after successful login. Multiple site commands can be separated using a new line character." }, "soTimeout": { "kind": "parameter", "displayName": "So Timeout", "group": "advanced", "label": "advanced", "required": false, "type": "duration", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "300000", "configurationClass": "org.apache.camel.component.file.remote.FtpConfiguration", "configurationField": "configuration", "description": "Sets the so timeout FTP and FTPS 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." }, "stepwise": { "kind": "parameter", "displayName": "Stepwise", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.file.remote.FtpConfiguration", "configurationField": "configuration", "description": "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. Stepwise cannot be used together with streamDownload." }, - "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Sets whether synchronous processing should be strictly used" }, "throwExceptionOnConnectFailed": { "kind": "parameter", "displayName": "Throw Exception On Connect Failed", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.file.remote.FtpConfiguration", "configurationField": "configuration", "description": "Should an exception be thrown if connection failed (exhausted)By default exception is not thrown and a WARN is logged. You can use this to enable exception being thrown and handle the thrown exception from the org.apache.camel.spi.PollingConsumerPollStrategy rollback method." }, "timeout": { "kind": "parameter", "displayName": "Timeout", "group": "advanced", "label": "advanced", "required": false, "type": "duration", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "30000", "configurationClass": "org.apache.camel.component.file.remote.FtpConfiguration", "configurationField": "configuration", "description": "Sets the data timeout for waiting for reply Used only by FTPClient" }, "antExclude": { "kind": "parameter", "displayName": "Ant Exclude", "group": "filter", "label": "consumer,filter", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Ant style filter exclusion. If both antInclude and antExclude are used, antExclude takes precedence over antInclude. Multiple exclusions may be specified in comma-delimited format." }, diff --git a/components/camel-ftp/src/generated/resources/org/apache/camel/component/file/remote/ftps.json b/components/camel-ftp/src/generated/resources/org/apache/camel/component/file/remote/ftps.json index 4bfcc4bb73426..7e63f9792e527 100644 --- a/components/camel-ftp/src/generated/resources/org/apache/camel/component/file/remote/ftps.json +++ b/components/camel-ftp/src/generated/resources/org/apache/camel/component/file/remote/ftps.json @@ -92,7 +92,6 @@ "siteCommand": { "kind": "parameter", "displayName": "Site Command", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.file.remote.FtpsConfiguration", "configurationField": "configuration", "description": "Sets optional site command(s) to be executed after successful login. Multiple site commands can be separated using a new line character." }, "soTimeout": { "kind": "parameter", "displayName": "So Timeout", "group": "advanced", "label": "advanced", "required": false, "type": "duration", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "300000", "configurationClass": "org.apache.camel.component.file.remote.FtpsConfiguration", "configurationField": "configuration", "description": "Sets the so timeout FTP and FTPS 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." }, "stepwise": { "kind": "parameter", "displayName": "Stepwise", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.file.remote.FtpsConfiguration", "configurationField": "configuration", "description": "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. Stepwise cannot be used together with streamDownload." }, - "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Sets whether synchronous processing should be strictly used" }, "throwExceptionOnConnectFailed": { "kind": "parameter", "displayName": "Throw Exception On Connect Failed", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.file.remote.FtpsConfiguration", "configurationField": "configuration", "description": "Should an exception be thrown if connection failed (exhausted)By default exception is not thrown and a WARN is logged. You can use this to enable exception being thrown and handle the thrown exception from the org.apache.camel.spi.PollingConsumerPollStrategy rollback method." }, "timeout": { "kind": "parameter", "displayName": "Timeout", "group": "advanced", "label": "advanced", "required": false, "type": "duration", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "30000", "configurationClass": "org.apache.camel.component.file.remote.FtpsConfiguration", "configurationField": "configuration", "description": "Sets the data timeout for waiting for reply Used only by FTPClient" }, "antExclude": { "kind": "parameter", "displayName": "Ant Exclude", "group": "filter", "label": "consumer,filter", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Ant style filter exclusion. If both antInclude and antExclude are used, antExclude takes precedence over antInclude. Multiple exclusions may be specified in comma-delimited format." }, diff --git a/components/camel-ftp/src/generated/resources/org/apache/camel/component/file/remote/sftp.json b/components/camel-ftp/src/generated/resources/org/apache/camel/component/file/remote/sftp.json index 98e378da47c71..09c906a8e2e07 100644 --- a/components/camel-ftp/src/generated/resources/org/apache/camel/component/file/remote/sftp.json +++ b/components/camel-ftp/src/generated/resources/org/apache/camel/component/file/remote/sftp.json @@ -87,7 +87,6 @@ "serverAliveInterval": { "kind": "parameter", "displayName": "Server Alive Interval", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.file.remote.SftpConfiguration", "configurationField": "configuration", "description": "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." }, "soTimeout": { "kind": "parameter", "displayName": "So Timeout", "group": "advanced", "label": "advanced", "required": false, "type": "duration", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "300000", "configurationClass": "org.apache.camel.component.file.remote.SftpConfiguration", "configurationField": "configuration", "description": "Sets the so timeout FTP and FTPS 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." }, "stepwise": { "kind": "parameter", "displayName": "Stepwise", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.file.remote.SftpConfiguration", "configurationField": "configuration", "description": "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. Stepwise cannot be used together with streamDownload." }, - "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Sets whether synchronous processing should be strictly used" }, "throwExceptionOnConnectFailed": { "kind": "parameter", "displayName": "Throw Exception On Connect Failed", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.file.remote.SftpConfiguration", "configurationField": "configuration", "description": "Should an exception be thrown if connection failed (exhausted)By default exception is not thrown and a WARN is logged. You can use this to enable exception being thrown and handle the thrown exception from the org.apache.camel.spi.PollingConsumerPollStrategy rollback method." }, "timeout": { "kind": "parameter", "displayName": "Timeout", "group": "advanced", "label": "advanced", "required": false, "type": "duration", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "30000", "configurationClass": "org.apache.camel.component.file.remote.SftpConfiguration", "configurationField": "configuration", "description": "Sets the data timeout for waiting for reply Used only by FTPClient" }, "antExclude": { "kind": "parameter", "displayName": "Ant Exclude", "group": "filter", "label": "consumer,filter", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Ant style filter exclusion. If both antInclude and antExclude are used, antExclude takes precedence over antInclude. Multiple exclusions may be specified in comma-delimited format." }, 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 2b3191ba5a76e..58d878e8df74c 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 @@ -53,7 +53,7 @@ + "readLockIdempotentReleaseDelay,readLockIdempotentReleaseExecutorService," + "directoryMustExist,extendedAttributes,probeContentType,startingDirectoryMustExist," + "startingDirectoryMustHaveAccess,chmodDirectory,forceWrites,copyAndDeleteOnRenameFail," - + "renameUsingCopy") + + "renameUsingCopy,synchronous") @ManagedResource(description = "Managed FtpEndpoint") public class FtpEndpoint extends RemoteFileEndpoint { diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java index 736ea35839e72..fac83e02578a2 100644 --- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java +++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java @@ -50,7 +50,7 @@ + "readLockIdempotentReleaseDelay,readLockIdempotentReleaseExecutorService," + "directoryMustExist,extendedAttributes,probeContentType,startingDirectoryMustExist," + "startingDirectoryMustHaveAccess,chmodDirectory,forceWrites,copyAndDeleteOnRenameFail," - + "renameUsingCopy") + + "renameUsingCopy,synchronous") @ManagedResource(description = "Managed FtpsEndpoint") public class FtpsEndpoint extends FtpEndpoint { private static final Logger LOG = LoggerFactory.getLogger(FtpsEndpoint.class); 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 904805d6cf603..a8e78d54e4020 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 @@ -68,6 +68,8 @@ public abstract class RemoteFileEndpoint extends GenericFileEndpoint { private boolean download = true; public RemoteFileEndpoint() { + // ftp must be synchronous as the ftp-client is not thread-safe + setSynchronous(true); // no args constructor for spring bean endpoint configuration // for ftp we need to use higher interval/checkout that for files setReadLockTimeout(20000); @@ -80,6 +82,8 @@ public RemoteFileEndpoint() { public RemoteFileEndpoint(String uri, RemoteFileComponent component, RemoteFileConfiguration configuration) { super(uri, component); this.configuration = configuration; + // ftp must be synchronous as the ftp-client is not thread-safe + setSynchronous(true); // for ftp we need to use higher interval/checkout that for files setReadLockTimeout(20000); setReadLockCheckInterval(5000); @@ -180,12 +184,16 @@ public PollingConsumer createPollingConsumer() throws Exception { /** * Validates this endpoint if its configured properly. * - * @throws Exception is thrown if endpoint is invalid configured for its mandatory options + * @throws IllegalArgumentException is thrown if endpoint is invalid configured for its mandatory options */ protected void afterPropertiesSet() { RemoteFileConfiguration config = getConfiguration(); StringHelper.notEmpty(config.getHost(), "host"); StringHelper.notEmpty(config.getProtocol(), "protocol"); + + if (!isSynchronous()) { + throw new IllegalArgumentException("Using synchronous=false is not supported for camel-ftp"); + } } @Override diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java index ba1b7b4656ee7..5a26d75d3b730 100644 --- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java +++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java @@ -35,7 +35,7 @@ @Metadata(excludeProperties = "appendChars,bufferSize,siteCommand," + "directoryMustExist,extendedAttributes,probeContentType,startingDirectoryMustExist," + "startingDirectoryMustHaveAccess,forceWrites,copyAndDeleteOnRenameFail," - + "renameUsingCopy") + + "renameUsingCopy,synchronous") public class SftpEndpoint extends RemoteFileEndpoint { @UriParam diff --git a/components/camel-jsch/src/generated/java/org/apache/camel/component/scp/ScpEndpointConfigurer.java b/components/camel-jsch/src/generated/java/org/apache/camel/component/scp/ScpEndpointConfigurer.java index b43119058e1b7..7ded765e341dd 100644 --- a/components/camel-jsch/src/generated/java/org/apache/camel/component/scp/ScpEndpointConfigurer.java +++ b/components/camel-jsch/src/generated/java/org/apache/camel/component/scp/ScpEndpointConfigurer.java @@ -54,7 +54,6 @@ public boolean configure(CamelContext camelContext, Object obj, String name, Obj case "soTimeout": target.getConfiguration().setSoTimeout(property(camelContext, int.class, value)); return true; case "stricthostkeychecking": case "strictHostKeyChecking": target.getConfiguration().setStrictHostKeyChecking(property(camelContext, java.lang.String.class, value)); return true; - case "synchronous": target.setSynchronous(property(camelContext, boolean.class, value)); return true; case "timeout": target.getConfiguration().setTimeout(property(camelContext, int.class, value)); return true; case "useuserknownhostsfile": case "useUserKnownHostsFile": target.getConfiguration().setUseUserKnownHostsFile(property(camelContext, boolean.class, value)); return true; @@ -99,7 +98,6 @@ public Class getOptionType(String name, boolean ignoreCase) { case "soTimeout": return int.class; case "stricthostkeychecking": case "strictHostKeyChecking": return java.lang.String.class; - case "synchronous": return boolean.class; case "timeout": return int.class; case "useuserknownhostsfile": case "useUserKnownHostsFile": return boolean.class; @@ -145,7 +143,6 @@ public Object getOptionValue(Object obj, String name, boolean ignoreCase) { case "soTimeout": return target.getConfiguration().getSoTimeout(); case "stricthostkeychecking": case "strictHostKeyChecking": return target.getConfiguration().getStrictHostKeyChecking(); - case "synchronous": return target.isSynchronous(); case "timeout": return target.getConfiguration().getTimeout(); case "useuserknownhostsfile": case "useUserKnownHostsFile": return target.getConfiguration().isUseUserKnownHostsFile(); diff --git a/components/camel-jsch/src/generated/java/org/apache/camel/component/scp/ScpEndpointUriFactory.java b/components/camel-jsch/src/generated/java/org/apache/camel/component/scp/ScpEndpointUriFactory.java index b4ccbf4776f43..f2b0c3971a627 100644 --- a/components/camel-jsch/src/generated/java/org/apache/camel/component/scp/ScpEndpointUriFactory.java +++ b/components/camel-jsch/src/generated/java/org/apache/camel/component/scp/ScpEndpointUriFactory.java @@ -20,14 +20,13 @@ public class ScpEndpointUriFactory extends org.apache.camel.support.component.En private static final Set PROPERTY_NAMES; private static final Set SECRET_PROPERTY_NAMES; static { - Set props = new HashSet<>(26); + Set props = new HashSet<>(25); props.add("useUserKnownHostsFile"); props.add("disconnect"); props.add("disconnectOnBatchComplete"); props.add("moveExistingFileStrategy"); props.add("fileName"); props.add("strictHostKeyChecking"); - props.add("synchronous"); props.add("timeout"); props.add("flatten"); props.add("password"); diff --git a/components/camel-jsch/src/generated/resources/org/apache/camel/component/scp/scp.json b/components/camel-jsch/src/generated/resources/org/apache/camel/component/scp/scp.json index df33b24b87163..9d41ce1e76513 100644 --- a/components/camel-jsch/src/generated/resources/org/apache/camel/component/scp/scp.json +++ b/components/camel-jsch/src/generated/resources/org/apache/camel/component/scp/scp.json @@ -43,7 +43,6 @@ "moveExistingFileStrategy": { "kind": "parameter", "displayName": "Move Existing File Strategy", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.file.strategy.FileMoveExistingStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "Strategy (Custom Strategy) used to move file with special naming token to use when fileExist=Move is configured. By default, there is an implementation used if no custom strategy is provided" }, "connectTimeout": { "kind": "parameter", "displayName": "Connect Timeout", "group": "advanced", "label": "advanced", "required": false, "type": "duration", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "10000", "configurationClass": "org.apache.camel.component.scp.ScpConfiguration", "configurationField": "configuration", "description": "Sets the connect timeout for waiting for a connection to be established Used by both FTPClient and JSCH" }, "soTimeout": { "kind": "parameter", "displayName": "So Timeout", "group": "advanced", "label": "advanced", "required": false, "type": "duration", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "300000", "configurationClass": "org.apache.camel.component.scp.ScpConfiguration", "configurationField": "configuration", "description": "Sets the so timeout FTP and FTPS 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." }, - "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Sets whether synchronous processing should be strictly used" }, "timeout": { "kind": "parameter", "displayName": "Timeout", "group": "advanced", "label": "advanced", "required": false, "type": "duration", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "30000", "configurationClass": "org.apache.camel.component.scp.ScpConfiguration", "configurationField": "configuration", "description": "Sets the data timeout for waiting for reply Used only by FTPClient" }, "knownHostsFile": { "kind": "parameter", "displayName": "Known Hosts File", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.scp.ScpConfiguration", "configurationField": "configuration", "description": "Sets the known_hosts file, so that the jsch endpoint can do host key verification. You can prefix with classpath: to load the file from classpath instead of file system." }, "password": { "kind": "parameter", "displayName": "Password", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.scp.ScpConfiguration", "configurationField": "configuration", "description": "Password to use for login" }, diff --git a/components/camel-jsch/src/main/java/org/apache/camel/component/scp/ScpEndpoint.java b/components/camel-jsch/src/main/java/org/apache/camel/component/scp/ScpEndpoint.java index f2ff27c81d316..5f97aff0c484a 100644 --- a/components/camel-jsch/src/main/java/org/apache/camel/component/scp/ScpEndpoint.java +++ b/components/camel-jsch/src/main/java/org/apache/camel/component/scp/ScpEndpoint.java @@ -38,7 +38,7 @@ + ",maximumReconnectAttempts,reconnectDelay,autoCreate,bufferSize,siteCommand,stepwise,throwExceptionOnConnectFailed" + ",transferLoggingIntervalSeconds,transferLoggingLevel,transferLoggingVerbose,resumeDownload" + ",handleDirectoryParserAbsoluteResult,activePortRange,ftpClient,ftpClientConfig" - + ",ftpClientConfigParameters,ftpClientParameters,account") + + ",ftpClientConfigParameters,ftpClientParameters,account,synchronous") public class ScpEndpoint extends RemoteFileEndpoint { @UriParam