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 for
Command
executions that require file system access- Author:
- Apache MINA SSHD Project
-
Field Summary
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
ModifierConstructorDescriptionprotected
AbstractFileSystemCommand
(String command, CloseableExecutorService executorService) -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy
(ChannelSession channel) This method is called by the SSH server to destroy the command because the client has disconnected somehow.void
setFileSystem
(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 Details
-
fileSystem
-
-
Constructor Details
-
AbstractFileSystemCommand
-
-
Method Details
-
getFileSystem
-
setFileSystem
- Specified by:
setFileSystem
in interfaceFileSystemAware
-
destroy
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 interfaceCommandLifecycle
- Overrides:
destroy
in classAbstractCommandSupport
- Parameters:
channel
- TheChannelSession
through which the command has been received- Throws:
Exception
- if failed to destroy
-