summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/commons/ssh-lib
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/modules/commons/ssh-lib')
-rw-r--r--ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/echoShell/EchoShellFactory.kt12
1 files changed, 9 insertions, 3 deletions
diff --git a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/echoShell/EchoShellFactory.kt b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/echoShell/EchoShellFactory.kt
index 6e9d1968f..41cf607ee 100644
--- a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/echoShell/EchoShellFactory.kt
+++ b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/echoShell/EchoShellFactory.kt
@@ -19,7 +19,9 @@ package org.onap.ccsdk.cds.blueprintsprocessor.ssh.service.echoShell
import org.apache.sshd.common.Factory
import org.apache.sshd.server.Environment
import org.apache.sshd.server.ExitCallback
+import org.apache.sshd.server.channel.ChannelSession
import org.apache.sshd.server.command.Command
+import org.apache.sshd.server.shell.ShellFactory
import java.io.BufferedReader
import java.io.IOException
import java.io.InputStream
@@ -27,12 +29,16 @@ import java.io.InputStreamReader
import java.io.InterruptedIOException
import java.io.OutputStream
-class EchoShellFactory : Factory<Command> {
+class EchoShellFactory : Factory<Command>, ShellFactory {
override fun create(): Command {
return EchoShell()
}
+ override fun createShell(channel: ChannelSession?): Command {
+ return EchoShell()
+ }
+
companion object {
val INSTANCE = EchoShellFactory()
@@ -69,14 +75,14 @@ class EchoShell : Command, Runnable {
}
@Throws(IOException::class)
- override fun start(env: Environment) {
+ override fun start(channel: ChannelSession?, env: Environment?) {
environment = env
thread = Thread(this, "EchoShell")
thread!!.isDaemon = true
thread!!.start()
}
- override fun destroy() {
+ override fun destroy(channel: ChannelSession?) {
thread!!.interrupt()
}