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 | Description |
---|---|
ShellCommand(Consumer<Ssh.ExecuteParams> execute,
String command) |
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) |
public ShellCommand(Consumer<Ssh.ExecuteParams> execute, String command)
public void setInputStream(InputStream in)
setInputStream
in interface org.apache.sshd.server.command.Command
public void setOutputStream(OutputStream out)
setOutputStream
in interface org.apache.sshd.server.command.Command
public void setErrorStream(OutputStream err)
setErrorStream
in interface org.apache.sshd.server.command.Command
public void setExitCallback(org.apache.sshd.server.ExitCallback callback)
setExitCallback
in interface org.apache.sshd.server.command.Command
public void setSession(org.apache.sshd.server.session.ServerSession session)
setSession
in interface org.apache.sshd.server.SessionAware
public void start(org.apache.sshd.server.Environment env) throws IOException
start
in interface org.apache.sshd.server.command.CommandLifecycle
IOException
public void destroy()
destroy
in interface org.apache.sshd.server.command.CommandLifecycle
Copyright © 2020. All rights reserved.