Top Description Fields Constructors Methods
org.apache.sshd.server.command

public abstract Class AbstractFileSystemCommand

extends AbstractCommandSupport
implements FileSystemAware
Class Inheritance
All Implemented Interfaces
org.apache.sshd.common.file.FileSystemAware
Imports
java.io.IOException, java.nio.file.FileSystem, org.apache.sshd.common.file.FileSystemAware, org.apache.sshd.common.util.threads.CloseableExecutorService, org.apache.sshd.server.channel.ChannelSession

Provides a basic useful skeleton for Command executions that require file system access
Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
protected FileSystem
Inherited from org.apache.sshd.server.command.AbstractCommandSupport:
cbCalledcmdRunnerexecutorService

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public void
destroy(ChannelSession
The ChannelSession through which the command has been received
channel
)

Overrides org.apache.sshd.server.command.AbstractCommandSupport.destroy.

Implements org.apache.sshd.server.command.CommandLifecycle.destroy.

This method is called by the SSH server to destroy the command because the client has disconnected somehow.

public FileSystem
public void
setFileSystem(FileSystem
the file system
fileSystem
)

Implements org.apache.sshd.common.file.FileSystemAware.setFileSystem.

Set the file system in which this shell will be executed.

Inherited from org.apache.sshd.server.command.AbstractCommandSupport:
getCommandgetEnvironmentgetErrorStreamgetExecutorServicegetExitCallbackgetInputStreamgetOutputStreamgetServerSessiongetSessiongetStartedCommandFutureonExitonExitsetErrorStreamsetExitCallbacksetInputStreamsetOutputStreamsetSessionstarttoString

Field Detail

fileSystemback to summary
protected FileSystem fileSystem

Constructor Detail

AbstractFileSystemCommandback to summary
protected AbstractFileSystemCommand(String command, CloseableExecutorService executorService)

Method Detail

destroyback to summary
public void destroy(ChannelSession channel) throws Exception

Overrides org.apache.sshd.server.command.AbstractCommandSupport.destroy.

Implements org.apache.sshd.server.command.CommandLifecycle.destroy.

Doc from org.apache.sshd.server.command.CommandLifecycle.destroy.

This method is called by the SSH server to destroy the command because the client has disconnected somehow.

Parameters
channel:ChannelSession

The ChannelSession through which the command has been received

Annotations
@Override
Exceptions
Exception:
if failed to destroy
getFileSystemback to summary
public FileSystem getFileSystem()
setFileSystemback to summary
public void setFileSystem(FileSystem fileSystem)

Implements org.apache.sshd.common.file.FileSystemAware.setFileSystem.

Doc from org.apache.sshd.common.file.FileSystemAware.setFileSystem.

Set the file system in which this shell will be executed.

Parameters
fileSystem:FileSystem

the file system

Annotations
@Override