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 2018/07/10 08:26:21 UTC
[camel] branch master updated: CAMEL-12629: Regen
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 ddfc429 CAMEL-12629: Regen
ddfc429 is described below
commit ddfc4290d3056492313d01567c4460567cd72b9a
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Jul 10 10:26:10 2018 +0200
CAMEL-12629: Regen
---
.../camel-ssh/src/main/docs/ssh-component.adoc | 1 +
.../ssh/springboot/SshComponentConfiguration.java | 89 ++++++++++++++++++++++
2 files changed, 90 insertions(+)
diff --git a/components/camel-ssh/src/main/docs/ssh-component.adoc b/components/camel-ssh/src/main/docs/ssh-component.adoc
index 654710b..b9546a3 100644
--- a/components/camel-ssh/src/main/docs/ssh-component.adoc
+++ b/components/camel-ssh/src/main/docs/ssh-component.adoc
@@ -34,6 +34,7 @@ ssh:[username[:password]@]host[:port][?options]
The SSH component supports 15 options, which are listed below.
+
[width="100%",cols="2,5,^1,2",options="header"]
|===
| Name | Description | Default | Type
diff --git a/platforms/spring-boot/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentConfiguration.java
index ff34b4b..c8a19e1 100644
--- a/platforms/spring-boot/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentConfiguration.java
@@ -92,6 +92,21 @@ public class SshComponentConfiguration
*/
private String certResource;
/**
+ * Sets the channel type to pass to the Channel as part of command
+ * execution. Defaults to exec.
+ */
+ private String channelType;
+ /**
+ * Sets the shellPrompt to be dropped when response is read after command
+ * execution
+ */
+ private String shellPrompt;
+ /**
+ * Sets the sleep period in milliseconds to wait reading response from shell
+ * prompt. Defaults to 100 milliseconds.
+ */
+ private Long sleepForShellPrompt;
+ /**
* Whether the component should resolve property placeholders on itself when
* starting. Only properties which are of String type can use property
* placeholders.
@@ -190,6 +205,30 @@ public class SshComponentConfiguration
this.certResource = certResource;
}
+ public String getChannelType() {
+ return channelType;
+ }
+
+ public void setChannelType(String channelType) {
+ this.channelType = channelType;
+ }
+
+ public String getShellPrompt() {
+ return shellPrompt;
+ }
+
+ public void setShellPrompt(String shellPrompt) {
+ this.shellPrompt = shellPrompt;
+ }
+
+ public Long getSleepForShellPrompt() {
+ return sleepForShellPrompt;
+ }
+
+ public void setSleepForShellPrompt(Long sleepForShellPrompt) {
+ this.sleepForShellPrompt = sleepForShellPrompt;
+ }
+
public Boolean getResolvePropertyPlaceholders() {
return resolvePropertyPlaceholders;
}
@@ -298,6 +337,32 @@ public class SshComponentConfiguration
* should fail
*/
private Boolean failOnUnknownHost = false;
+ /**
+ * Sets the channel type to pass to the Channel as part of command
+ * execution. Defaults to "exec".
+ *
+ * @param channelTypeString
+ * defining the type of Channel to use for command execution.
+ * @seeorg.apache.sshd.common.channel.Channel
+ */
+ private String channelType = "exec";
+ /**
+ * Sets the shellPrompt to be dropped when response is read after
+ * command execution
+ *
+ * @param shellPromptString
+ * defining ending string of command line which has to be
+ * dropped when response is read after command execution.
+ */
+ private String shellPrompt;
+ /**
+ * Sets the sleep period in milliseconds to wait reading response from
+ * shell prompt. Defaults to 100 milliseconds.
+ *
+ * @param sleepForShellPromptlong
+ * milliseconds to wait.
+ */
+ private Long sleepForShellPrompt = 100L;
public String getUsername() {
return username;
@@ -397,5 +462,29 @@ public class SshComponentConfiguration
public void setFailOnUnknownHost(Boolean failOnUnknownHost) {
this.failOnUnknownHost = failOnUnknownHost;
}
+
+ public String getChannelType() {
+ return channelType;
+ }
+
+ public void setChannelType(String channelType) {
+ this.channelType = channelType;
+ }
+
+ public String getShellPrompt() {
+ return shellPrompt;
+ }
+
+ public void setShellPrompt(String shellPrompt) {
+ this.shellPrompt = shellPrompt;
+ }
+
+ public Long getSleepForShellPrompt() {
+ return sleepForShellPrompt;
+ }
+
+ public void setSleepForShellPrompt(Long sleepForShellPrompt) {
+ this.sleepForShellPrompt = sleepForShellPrompt;
+ }
}
}
\ No newline at end of file