Package org.apache.sshd.server.command
Interface Command
- All Superinterfaces:
CommandDirectErrorStreamAware,CommandDirectInputStreamAware,CommandDirectOutputStreamAware,CommandDirectStreamsAware,CommandLifecycle
- All Known Subinterfaces:
AsyncCommand
- All Known Implementing Classes:
AbstractCommandSupport,AbstractFileSystemCommand,InvertedShellWrapper,ScpCommand,ScpShell,SftpSubsystem,UnknownCommand
Represents a command, shell or subsystem that can be used to send command.
This command have direct streams, meaning those streams will be provided by the ssh server for the shell to use directly. This interface is suitable for implementing commands in java, rather than using external processes. For wrapping such processes or using inverted streams,
seeInvertedShellWrapper.-
Method Summary
Modifier and TypeMethodDescriptionvoidsetExitCallback(ExitCallback callback) Set the callback that the shell has to call when it is closed.Methods inherited from interface org.apache.sshd.server.command.CommandDirectErrorStreamAware
setErrorStreamMethods inherited from interface org.apache.sshd.server.command.CommandDirectInputStreamAware
setInputStreamMethods inherited from interface org.apache.sshd.server.command.CommandDirectOutputStreamAware
setOutputStreamMethods inherited from interface org.apache.sshd.server.command.CommandLifecycle
destroy, start
-
Method Details
-
setExitCallback
Set the callback that the shell has to call when it is closed.- Parameters:
callback- TheExitCallbackto call when shell is closed
-