- java.lang.Object
-
- org.jline.builtins.ssh.ShellCommand
-
- All Implemented Interfaces:
org.apache.sshd.server.command.Command
,org.apache.sshd.server.command.CommandLifecycle
,org.apache.sshd.server.SessionAware
public class ShellCommand extends Object implements org.apache.sshd.server.command.Command, org.apache.sshd.server.SessionAware
-
-
Constructor Summary
Constructors Constructor Description ShellCommand(Consumer<Ssh.ExecuteParams> execute, String command)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
void
setErrorStream(OutputStream err)
void
setExitCallback(org.apache.sshd.server.ExitCallback callback)
void
setInputStream(InputStream in)
void
setOutputStream(OutputStream out)
void
setSession(org.apache.sshd.server.session.ServerSession session)
void
start(org.apache.sshd.server.Environment env)
-
-
-
Constructor Detail
-
ShellCommand
public ShellCommand(Consumer<Ssh.ExecuteParams> execute, String command)
-
-
Method Detail
-
setInputStream
public void setInputStream(InputStream in)
- Specified by:
setInputStream
in interfaceorg.apache.sshd.server.command.Command
-
setOutputStream
public void setOutputStream(OutputStream out)
- Specified by:
setOutputStream
in interfaceorg.apache.sshd.server.command.Command
-
setErrorStream
public void setErrorStream(OutputStream err)
- Specified by:
setErrorStream
in interfaceorg.apache.sshd.server.command.Command
-
setExitCallback
public void setExitCallback(org.apache.sshd.server.ExitCallback callback)
- Specified by:
setExitCallback
in interfaceorg.apache.sshd.server.command.Command
-
setSession
public void setSession(org.apache.sshd.server.session.ServerSession session)
- Specified by:
setSession
in interfaceorg.apache.sshd.server.SessionAware
-
start
public void start(org.apache.sshd.server.Environment env) throws IOException
- Specified by:
start
in interfaceorg.apache.sshd.server.command.CommandLifecycle
- Throws:
IOException
-
destroy
public void destroy()
- Specified by:
destroy
in interfaceorg.apache.sshd.server.command.CommandLifecycle
-
-