public abstract class AbstractFileSystemCommand extends AbstractCommandSupport implements FileSystemAware
Command
executions that require file system accessModifier and Type | Field and Description |
---|---|
protected FileSystem |
fileSystem |
cbCalled, cmdRunner, executorService
log
Modifier | Constructor and Description |
---|---|
protected |
AbstractFileSystemCommand(String command,
CloseableExecutorService executorService) |
Modifier and Type | Method and Description |
---|---|
void |
destroy(ChannelSession channel)
This method is called by the SSH server to destroy the command because the client has disconnected somehow.
|
FileSystem |
getFileSystem() |
void |
setFileSystem(FileSystem fileSystem)
Set the file system in which this shell will be executed.
|
getCommand, getEnvironment, getErrorStream, getExecutorService, getExitCallback, getInputStream, getOutputStream, getServerSession, getSession, getStartedCommandFuture, onExit, onExit, setErrorStream, setExitCallback, setInputStream, setOutputStream, setSession, start, toString
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setFileSystemFactory
getSessionContext
protected FileSystem fileSystem
protected AbstractFileSystemCommand(String command, CloseableExecutorService executorService)
public FileSystem getFileSystem()
public void setFileSystem(FileSystem fileSystem)
FileSystemAware
setFileSystem
in interface FileSystemAware
fileSystem
- the file systempublic void destroy(ChannelSession channel) throws Exception
CommandLifecycle
destroy
in interface CommandLifecycle
destroy
in class AbstractCommandSupport
channel
- The ChannelSession
through which the command has been receivedException
- if failed to destroyCopyright © 2008–2024 The Apache Software Foundation. All rights reserved.