Package org.apache.sshd.server.command
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,FileSystemAware,SessionContextHolder,SessionHolder<ServerSession>,ExecutorServiceCarrier,Command,CommandDirectErrorStreamAware,CommandDirectInputStreamAware,CommandDirectOutputStreamAware,CommandDirectStreamsAware,CommandLifecycle,ServerSessionAware,ServerSessionHolder
public abstract class AbstractFileSystemCommand extends AbstractCommandSupport implements FileSystemAware
Provides a basic useful skeleton forCommandexecutions that require file system access- Author:
- Apache MINA SSHD Project
-
-
Field Summary
Fields Modifier and Type Field Description protected FileSystemfileSystem-
Fields inherited from class org.apache.sshd.server.command.AbstractCommandSupport
cbCalled, cmdRunner, executorService
-
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractFileSystemCommand(String command, CloseableExecutorService executorService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy(ChannelSession channel)This method is called by the SSH server to destroy the command because the client has disconnected somehow.FileSystemgetFileSystem()voidsetFileSystem(FileSystem fileSystem)-
Methods inherited from class org.apache.sshd.server.command.AbstractCommandSupport
getCommand, getEnvironment, getErrorStream, getExecutorService, getExitCallback, getInputStream, getOutputStream, getServerSession, getSession, getStartedCommandFuture, onExit, onExit, setErrorStream, setExitCallback, setInputStream, setOutputStream, setSession, start, toString
-
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.sshd.common.file.FileSystemAware
setFileSystemFactory
-
Methods inherited from interface org.apache.sshd.common.session.SessionHolder
getSessionContext
-
-
-
-
Field Detail
-
fileSystem
protected FileSystem fileSystem
-
-
Constructor Detail
-
AbstractFileSystemCommand
protected AbstractFileSystemCommand(String command, CloseableExecutorService executorService)
-
-
Method Detail
-
getFileSystem
public FileSystem getFileSystem()
-
setFileSystem
public void setFileSystem(FileSystem fileSystem)
- Specified by:
setFileSystemin interfaceFileSystemAware
-
destroy
public void destroy(ChannelSession channel) throws Exception
Description copied from interface:CommandLifecycleThis method is called by the SSH server to destroy the command because the client has disconnected somehow.- Specified by:
destroyin interfaceCommandLifecycle- Overrides:
destroyin classAbstractCommandSupport- Parameters:
channel- TheChannelSessionthrough which the command has been received- Throws:
Exception- if failed to destroy
-
-