Package org.apache.karaf.shell.ssh
Class ShellCommand
- java.lang.Object
-
- org.apache.karaf.shell.ssh.ShellCommand
-
- All Implemented Interfaces:
org.apache.sshd.server.command.Command,org.apache.sshd.server.command.CommandDirectErrorStreamAware,org.apache.sshd.server.command.CommandDirectInputStreamAware,org.apache.sshd.server.command.CommandDirectOutputStreamAware,org.apache.sshd.server.command.CommandDirectStreamsAware,org.apache.sshd.server.command.CommandLifecycle
public class ShellCommand extends Object implements org.apache.sshd.server.command.Command
-
-
Field Summary
Fields Modifier and Type Field Description static StringEXEC_INIT_SCRIPTstatic StringSHELL_INIT_SCRIPT
-
Constructor Summary
Constructors Constructor Description ShellCommand(org.apache.karaf.shell.api.console.SessionFactory sessionFactory, String command)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy(org.apache.sshd.server.channel.ChannelSession channelSession)voidrun()voidsetErrorStream(OutputStream err)voidsetExitCallback(org.apache.sshd.server.ExitCallback callback)voidsetInputStream(InputStream in)voidsetOutputStream(OutputStream out)voidstart(org.apache.sshd.server.channel.ChannelSession channelSession, org.apache.sshd.server.Environment environment)
-
-
-
Field Detail
-
SHELL_INIT_SCRIPT
public static final String SHELL_INIT_SCRIPT
- See Also:
- Constant Field Values
-
EXEC_INIT_SCRIPT
public static final String EXEC_INIT_SCRIPT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ShellCommand
public ShellCommand(org.apache.karaf.shell.api.console.SessionFactory sessionFactory, String command)
-
-
Method Detail
-
setInputStream
public void setInputStream(InputStream in)
- Specified by:
setInputStreamin interfaceorg.apache.sshd.server.command.CommandDirectInputStreamAware
-
setOutputStream
public void setOutputStream(OutputStream out)
- Specified by:
setOutputStreamin interfaceorg.apache.sshd.server.command.CommandDirectOutputStreamAware
-
setErrorStream
public void setErrorStream(OutputStream err)
- Specified by:
setErrorStreamin interfaceorg.apache.sshd.server.command.CommandDirectErrorStreamAware
-
setExitCallback
public void setExitCallback(org.apache.sshd.server.ExitCallback callback)
- Specified by:
setExitCallbackin interfaceorg.apache.sshd.server.command.Command
-
start
public void start(org.apache.sshd.server.channel.ChannelSession channelSession, org.apache.sshd.server.Environment environment) throws IOException- Specified by:
startin interfaceorg.apache.sshd.server.command.CommandLifecycle- Throws:
IOException
-
run
public void run()
-
-