Top Description Fields Constructors Methods
org.apache.sshd.sftp

public final Class SftpModuleProperties

extends Object
Class Inheritance
Imports
java.nio.charset.Charset, .StandardCharsets, java.nio.file.Path, java.time.Duration, org.apache.sshd.common.Property, .PropertyResolver, .SshConstants, org.apache.sshd.common.util.ValidateUtils, org.apache.sshd.common.util.buffer.Buffer, org.apache.sshd.common.util.io.IoUtils, org.apache.sshd.server.config.SshServerConfigFileReader, org.apache.sshd.sftp.client.SftpClient, org.apache.sshd.sftp.common.SftpHelper, org.apache.sshd.sftp.server.AbstractSftpSubsystemHelper, .SftpSubsystem

Configurable properties for sshd-sftp.
Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
public static final Property<String>
ACL_SUPPORTED_MASK

Comma separate list of SSH_ACL_CAP_xxx names - where name can be without the prefix.

public static final Property<Boolean>
APPEND_END_OF_LIST_INDICATOR

Used to control whether to append the end-of-list indicator for SSH_FXP_NAME responses via SftpHelper#indicateEndOfNamesList(Buffer, int, PropertyResolver, boolean) call, as indicated by SFTP v6 - section 9.4

public static final Property<Duration>
public static final Property<Boolean>
AUTO_FOLLOW_LINKS

Whether to automatically follow symbolic links when resolving paths

public static final Property<String>
CLIENT_EXTENSIONS

Allows controlling reports of which client extensions are supported (and reported via "support" and "support2" server extensions) as a comma-separate list of names

Note

requires overriding the AbstractSftpSubsystemHelper#executeExtendedCommand(Buffer, int, String) command accordingly.

public static final Property<Duration>
public static final Property<Integer>
COPY_BUF_SIZE

Internal allocate buffer size when copying data to/from the channel

public static final int
public static final int
public static final Property<Integer>
FILE_HANDLE_SIZE

Size in bytes of the opaque handle value

public static final Property<Integer>
public static final int
public static final int
public static final Property<Integer>
MAX_OPEN_HANDLES_PER_SESSION

Properties key for the maximum of available open handles per session.

public static final Property<Integer>
MAX_READDATA_PACKET_LENGTH

Force the use of a max.

public static final Property<Integer>
MAX_READDIR_DATA_SIZE

Maximum amount of data allocated for listing the contents of a directory in any single invocation of SftpSubsystem#doReadDir(Buffer, int)

public static final Property<Integer>
MAX_WRITEDATA_PACKET_LENGTH

Force the use of a max.

public static final int
public static final int
public static final int
public static final int
public static final Property<Charset>
public static final Property<Charset>
NAME_DECODING_CHARSET

Used to indicate the Charset (or its name) for decoding referenced files/folders names - extracted from the client session when 1st initialized.

public static final Property<String>
NEWLINE_VALUE

Property that can be used to set the reported NL value.

public static final Property<String>
OPENSSH_EXTENSIONS

Comma-separated list of which OpenSSH extensions are reported and what version is reported for each - format: name=version.

public static final Property<Integer>
POOL_CORE_SIZE

If >= 0, that many channels may be kept open in the channel pool of an org.apache.sshd.sftp.client.fs.SftpFileSystem even if they are idle; by default 1.

public static final Property<Duration>
POOL_LIFE_TIME

A timeout after which idle channels in the pool of an org.apache.sshd.sftp.client.fs.SftpFileSystem are removed from the pool and closed; by default 10 seconds.

public static final Property<Integer>
POOL_SIZE

The maximum size of the channel pool used by an org.apache.sshd.sftp.client.fs.SftpFileSystem; by default 8.

public static final Property<Integer>
public static final Property<Duration>
SFTP_CHANNEL_OPEN_TIMEOUT

Property that can be used on the org.apache.sshd.common.FactoryManager to control the internal timeout used by the client to open a channel.

public static final Property<Integer>
SFTP_VERSION

Force the use of a given sftp version

public static final Property<Boolean>
TOLERATE_EXCESS_DATA

Apparently some SFTP servers may return more data than requested in SFTP read requests.

public static final Property<Integer>
public static final Property<Integer>
WRITE_CHUNK_SIZE

Property used to avoid large buffers when org.apache.sshd.sftp.client.impl.AbstractSftpClient#write(SftpClient.Handle, long, byte[], int, int) is invoked with a large buffer size.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ACL_SUPPORTED_MASKback to summary
public static final Property<String> ACL_SUPPORTED_MASK

Comma separate list of SSH_ACL_CAP_xxx names - where name can be without the prefix. If not defined then AbstractSftpSubsystemHelper#DEFAULT_ACL_SUPPORTED_MASK is used

APPEND_END_OF_LIST_INDICATORback to summary
public static final Property<Boolean> APPEND_END_OF_LIST_INDICATOR

Used to control whether to append the end-of-list indicator for SSH_FXP_NAME responses via SftpHelper#indicateEndOfNamesList(Buffer, int, PropertyResolver, boolean) call, as indicated by SFTP v6 - section 9.4

AUTH_TIMEback to summary
public static final Property<Duration> AUTH_TIME

See org.apache.sshd.sftp.client.fs.SftpFileSystemProvider.

CLIENT_EXTENSIONSback to summary
public static final Property<String> CLIENT_EXTENSIONS

Allows controlling reports of which client extensions are supported (and reported via "support" and "support2" server extensions) as a comma-separate list of names

Note

requires overriding the AbstractSftpSubsystemHelper#executeExtendedCommand(Buffer, int, String) command accordingly. If empty string is set then no server extensions are reported

See Also
AbstractSftpSubsystemHelper#DEFAULT_SUPPORTED_CLIENT_EXTENSIONS
CONNECT_TIMEback to summary
public static final Property<Duration> CONNECT_TIME

See org.apache.sshd.sftp.client.fs.SftpFileSystemProvider.

COPY_BUF_SIZEback to summary
public static final Property<Integer> COPY_BUF_SIZE

Internal allocate buffer size when copying data to/from the channel

DEFAULT_FILE_HANDLE_ROUNDSback to summary
public static final int DEFAULT_FILE_HANDLE_ROUNDS
DEFAULT_FILE_HANDLE_SIZEback to summary
public static final int DEFAULT_FILE_HANDLE_SIZE
FILE_HANDLE_SIZEback to summary
public static final Property<Integer> FILE_HANDLE_SIZE

Size in bytes of the opaque handle value

See Also
DEFAULT_FILE_HANDLE_SIZE
MAX_FILE_HANDLE_RAND_ROUNDSback to summary
public static final Property<Integer> MAX_FILE_HANDLE_RAND_ROUNDS

Max. rounds to attempt to create a unique file handle - if all handles already in use after these many rounds, then an exception is thrown

See Also
SftpSubsystem#generateFileHandle(Path), DEFAULT_FILE_HANDLE_ROUNDS
MAX_FILE_HANDLE_ROUNDSback to summary
public static final int MAX_FILE_HANDLE_ROUNDS
MAX_FILE_HANDLE_SIZEback to summary
public static final int MAX_FILE_HANDLE_SIZE
MAX_OPEN_HANDLES_PER_SESSIONback to summary
public static final Property<Integer> MAX_OPEN_HANDLES_PER_SESSION

Properties key for the maximum of available open handles per session. By default we impose virtually no limit and rely on the O/S.

MAX_READDATA_PACKET_LENGTHback to summary
public static final Property<Integer> MAX_READDATA_PACKET_LENGTH

Force the use of a max. packet length for AbstractSftpSubsystemHelper#doRead(Buffer, int) protection against malicious packets

MAX_READDIR_DATA_SIZEback to summary
public static final Property<Integer> MAX_READDIR_DATA_SIZE

Maximum amount of data allocated for listing the contents of a directory in any single invocation of SftpSubsystem#doReadDir(Buffer, int)

MAX_WRITEDATA_PACKET_LENGTHback to summary
public static final Property<Integer> MAX_WRITEDATA_PACKET_LENGTH

Force the use of a max. packet length for AbstractSftpSubsystemHelper#doWrite(Buffer, int) protection against malicious packets

MIN_FILE_HANDLE_ROUNDSback to summary
public static final int MIN_FILE_HANDLE_ROUNDS
MIN_FILE_HANDLE_SIZEback to summary
public static final int MIN_FILE_HANDLE_SIZE
MIN_READDATA_PACKET_LENGTHback to summary
public static final int MIN_READDATA_PACKET_LENGTH
MIN_WRITEDATA_PACKET_LENGTHback to summary
public static final int MIN_WRITEDATA_PACKET_LENGTH
NAME_DECODER_CHARSETback to summary
public static final Property<Charset> NAME_DECODER_CHARSET

See org.apache.sshd.sftp.client.fs.SftpFileSystemProvider.

NAME_DECODING_CHARSETback to summary
public static final Property<Charset> NAME_DECODING_CHARSET

Used to indicate the Charset (or its name) for decoding referenced files/folders names - extracted from the client session when 1st initialized.

See Also
SftpClient#getNameDecodingCharset(), SftpClient#setNameDecodingCharset(Charset)
NEWLINE_VALUEback to summary
public static final Property<String> NEWLINE_VALUE

Property that can be used to set the reported NL value. If not set, then IoUtils#EOL is used

OPENSSH_EXTENSIONSback to summary
public static final Property<String> OPENSSH_EXTENSIONS

Comma-separated list of which OpenSSH extensions are reported and what version is reported for each - format: name=version. If empty value set, then no such extensions are reported. Otherwise, the AbstractSftpSubsystemHelper#DEFAULT_OPEN_SSH_EXTENSIONS are used

POOL_CORE_SIZEback to summary
public static final Property<Integer> POOL_CORE_SIZE

If >= 0, that many channels may be kept open in the channel pool of an org.apache.sshd.sftp.client.fs.SftpFileSystem even if they are idle; by default 1. If >= POOL_SIZE, channels will not expire and will be closed only then the file system is closed, or if the server closes them.

See Also
org.apache.sshd.sftp.client.fs.SftpFileSystem
POOL_LIFE_TIMEback to summary
public static final Property<Duration> POOL_LIFE_TIME

A timeout after which idle channels in the pool of an org.apache.sshd.sftp.client.fs.SftpFileSystem are removed from the pool and closed; by default 10 seconds. If set to zero, channels in the pool will not expire and will be closed only then the file system is closed, or if the server closes them.

The duration should not be shorter than 1 millisecond. If it is, 1 millisecond will be assumed.

See Also
org.apache.sshd.sftp.client.fs.SftpFileSystem
POOL_SIZEback to summary
public static final Property<Integer> POOL_SIZE

The maximum size of the channel pool used by an org.apache.sshd.sftp.client.fs.SftpFileSystem; by default 8. The value must be > zero.

See Also
org.apache.sshd.sftp.client.fs.SftpFileSystem
READ_BUFFER_SIZEback to summary
public static final Property<Integer> READ_BUFFER_SIZE

See org.apache.sshd.sftp.client.fs.SftpFileSystemProvider.

SFTP_CHANNEL_OPEN_TIMEOUTback to summary
public static final Property<Duration> SFTP_CHANNEL_OPEN_TIMEOUT

Property that can be used on the org.apache.sshd.common.FactoryManager to control the internal timeout used by the client to open a channel.

SFTP_VERSIONback to summary
public static final Property<Integer> SFTP_VERSION

Force the use of a given sftp version

TOLERATE_EXCESS_DATAback to summary
public static final Property<Boolean> TOLERATE_EXCESS_DATA

Apparently some SFTP servers may return more data than requested in SFTP read requests. This is a violation of the SFTP protocol. If this flag is true, such excess data is ignored and a warning is logged. If the flag is false (the default), an exception is thrown. The flag can be set on an SSH session or on the client channel of an SftpClient.

WRITE_BUFFER_SIZEback to summary
public static final Property<Integer> WRITE_BUFFER_SIZE

See org.apache.sshd.sftp.client.fs.SftpFileSystemProvider.

WRITE_CHUNK_SIZEback to summary
public static final Property<Integer> WRITE_CHUNK_SIZE

Property used to avoid large buffers when org.apache.sshd.sftp.client.impl.AbstractSftpClient#write(SftpClient.Handle, long, byte[], int, int) is invoked with a large buffer size.

Constructor Detail

SftpModulePropertiesback to summary
private SftpModuleProperties()