Class AbstractFileSystemCommand

java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.server.command.AbstractCommandSupport
org.apache.sshd.server.command.AbstractFileSystemCommand
All Implemented Interfaces:
Runnable, org.apache.sshd.common.file.FileSystemAware, org.apache.sshd.common.session.SessionContextHolder, SessionHolder<ServerSession>, org.apache.sshd.common.util.threads.ExecutorServiceCarrier, Command, CommandDirectErrorStreamAware, CommandDirectInputStreamAware, CommandDirectOutputStreamAware, CommandDirectStreamsAware, CommandLifecycle, ServerSessionAware, ServerSessionHolder

public abstract class AbstractFileSystemCommand extends AbstractCommandSupport implements org.apache.sshd.common.file.FileSystemAware
Provides a basic useful skeleton for Command executions that require file system access
Author:
Apache MINA SSHD Project
  • Field Details

  • Constructor Details

    • AbstractFileSystemCommand

      protected AbstractFileSystemCommand(String command, org.apache.sshd.common.util.threads.CloseableExecutorService executorService)
  • Method Details

    • getFileSystem

      public FileSystem getFileSystem()
    • setFileSystem

      public void setFileSystem(FileSystem fileSystem)
      Specified by:
      setFileSystem in interface org.apache.sshd.common.file.FileSystemAware
    • destroy

      public void destroy(ChannelSession channel) throws Exception
      Description copied from interface: CommandLifecycle
      This method is called by the SSH server to destroy the command because the client has disconnected somehow.
      Specified by:
      destroy in interface CommandLifecycle
      Overrides:
      destroy in class AbstractCommandSupport
      Parameters:
      channel - The ChannelSession through which the command has been received
      Throws:
      Exception - if failed to destroy