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
- Direct Known Subclasses:
ScpCommand,ScpShell
public abstract class AbstractFileSystemCommand
extends AbstractCommandSupport
implements FileSystemAware
Provides a basic useful skeleton for
Command executions that require file system access-
Field Summary
FieldsFields inherited from class org.apache.sshd.server.command.AbstractCommandSupport
cbCalled, cmdRunner, executorServiceFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractFileSystemCommand(String command, CloseableExecutorService executorService) -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy(ChannelSession channel) This method is called by the SSH server to destroy the command because the client has disconnected somehow.voidsetFileSystem(FileSystem fileSystem) Set the file system in which this shell will be executed.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, toStringMethods 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, warnMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.sshd.common.file.FileSystemAware
setFileSystemFactoryMethods inherited from interface org.apache.sshd.common.session.SessionHolder
getSessionContext
-
Field Details
-
fileSystem
-
-
Constructor Details
-
AbstractFileSystemCommand
-
-
Method Details
-
getFileSystem
-
setFileSystem
Description copied from interface:FileSystemAwareSet the file system in which this shell will be executed.- Specified by:
setFileSystemin interfaceFileSystemAware- Parameters:
fileSystem- the file system
-
destroy
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
-