Class SftpBuilder

Namespace: redb.Route.Sftp
Assembly: redb.Route.Sftp.dll

Fluent builder for SFTP endpoint URIs.

public sealed class SftpBuilder

Inheritance

Object→SftpBuilder

Methods

AllowNullBody()

Allow sending null body.

public SftpBuilder AllowNullBody()

AntExclude(string)

Ant-style patterns over the relative path that drop a file ("archive/**").

public SftpBuilder AntExclude(string patterns)

AntFilterCaseSensitive(bool)

Whether the Ant patterns respect case (default true).

public SftpBuilder AntFilterCaseSensitive(bool value = true)

AntInclude(string)

Ant-style patterns over the path relative to the polled directory, several separated by commas ("TYPE_A/outbox/*.csv"). Sees directories, which Includ...

public SftpBuilder AntInclude(string patterns)

AppendChars(string)

Characters to append after writing.

public SftpBuilder AppendChars(string chars)

AutoCreate(bool)

Auto-create target directory. Default true.

public SftpBuilder AutoCreate(bool autoCreate = true)

BackoffErrorThreshold(IExpression)

Backoff error threshold from an expression.

public SftpBuilder BackoffErrorThreshold(IExpression value)

BackoffErrorThreshold(int)

Consecutive failed polls (the poll itself threw) that arm the backoff skip (0 = disabled).

public SftpBuilder BackoffErrorThreshold(int value)

BackoffIdleThreshold(IExpression)

Backoff idle threshold from an expression.

public SftpBuilder BackoffIdleThreshold(IExpression value)

BackoffIdleThreshold(int)

Consecutive idle polls (no exchange created) that arm the backoff skip (0 = disabled).

public SftpBuilder BackoffIdleThreshold(int value)

BackoffMultiplier(IExpression)

Backoff multiplier from an expression.

public SftpBuilder BackoffMultiplier(IExpression value)

BackoffMultiplier(int)

Skip this many polls once a backoff threshold is hit (0 = disabled; needs a threshold).

public SftpBuilder BackoffMultiplier(int value)

BackoffOnFailedExchanges()

Count a poll whose every created exchange failed as an error for backoff (needs BackoffErrorThreshold).

public SftpBuilder BackoffOnFailedExchanges()

BufferSize(IExpression)

Buffer size from an expression.

public SftpBuilder BufferSize(IExpression bytes)

BufferSize(int)

Buffer size for transfers. Default 32768.

public SftpBuilder BufferSize(int bytes)

Build()

Builds the SFTP endpoint URI string.

public string Build()

Charset(string)

Character encoding for text mode. Default "utf-8".

public SftpBuilder Charset(string charset)

Chmod(string)

File permissions (e.g. "644").

public SftpBuilder Chmod(string permissions)

ChmodDirectory(string)

Directory permissions (e.g. "755").

public SftpBuilder ChmodDirectory(string permissions)

Compression()

Enable SSH compression.

public SftpBuilder Compression()

ConnectionFactory(string)

References a named from the route registry instead of

public SftpBuilder ConnectionFactory(string name)

ConnectionTimeout(IExpression)

Connection timeout from an expression.

public SftpBuilder ConnectionTimeout(IExpression ms)

ConnectionTimeout(int)

Connection timeout in milliseconds. Default 30000.

public SftpBuilder ConnectionTimeout(int ms)

Delay(IExpression)

Poll delay from an expression.

public SftpBuilder Delay(IExpression ms)

Delay(int)

Poll delay in milliseconds. Default 60000.

public SftpBuilder Delay(int ms)

Delete()

Delete file after processing.

public SftpBuilder Delete()

DirectoryMustExist()

Target directory must exist (producer).

public SftpBuilder DirectoryMustExist()

Disconnect()

Disconnect after each operation.

public SftpBuilder Disconnect()

DoneFileName(IExpression)

Done file name pattern.

public SftpBuilder DoneFileName(IExpression name)

DoneFileName(string)

Done file name pattern (template string, supports ${...}).

public SftpBuilder DoneFileName(string name)

EagerDeleteTargetFile(bool)

Eagerly delete target file before writing. Default true.

public SftpBuilder EagerDeleteTargetFile(bool eager = true)

Exclude(string)

File name pattern to exclude.

public SftpBuilder Exclude(string pattern)

FileExist(string)

Strategy when target file exists: Override, Append, Fail, Ignore, Move, TryRename.

public SftpBuilder FileExist(string strategy)

FileName(IExpression)

Output file name or expression (e.g. Header("CamelFileName")).

public SftpBuilder FileName(IExpression name)

FileName(string)

Output file name (template string, supports ${...}).

public SftpBuilder FileName(string name)

Filter(string)

Name of an IGenericFileFilter in the route registry ("#myFilter") deciding for files and directories.

public SftpBuilder Filter(string registryName)

FilterDirectory(string)

Condition deciding whether a subdirectory is walked into at all — evaluated before it is listed.

public SftpBuilder FilterDirectory(string condition)

FilterFile(string)

Condition deciding whether a polled file is taken, evaluated before it is read or moved.

public SftpBuilder FilterFile(string condition)

Flatten()

Flatten directory structure (single directory).

public SftpBuilder Flatten()

Host(IExpression)

SFTP server hostname. Default "localhost".

public SftpBuilder Host(IExpression host)

Host(string)

SFTP server hostname (template string, supports ${...}).

public SftpBuilder Host(string host)

Idempotent(IExpression?)

Enable idempotent consumer with optional key expression.

public SftpBuilder Idempotent(IExpression? key = null)

Idempotent(string)

Enable idempotent consumer with a key (template string, supports ${...}).

public SftpBuilder Idempotent(string key)

IgnoreFileNotFoundOrPermissionError()

Ignore file-not-found or permission errors.

public SftpBuilder IgnoreFileNotFoundOrPermissionError()

Include(string)

File name pattern to include (e.g. "*.csv").

public SftpBuilder Include(string pattern)

InitialDelay(IExpression)

Initial delay from an expression.

public SftpBuilder InitialDelay(IExpression ms)

InitialDelay(int)

Initial delay before first poll. Default 1000.

public SftpBuilder InitialDelay(int ms)

JailStartingDirectory(bool)

Jail operations within the starting directory. Default true.

public SftpBuilder JailStartingDirectory(bool jail = true)

KeepAliveInterval(IExpression)

Keep-alive interval from an expression.

public SftpBuilder KeepAliveInterval(IExpression ms)

KeepAliveInterval(int)

Keep-alive interval in milliseconds. 0 = disabled.

public SftpBuilder KeepAliveInterval(int ms)

KeepLastModified()

Preserve last modified timestamp.

public SftpBuilder KeepLastModified()

KnownHostsFile(string)

Path to known_hosts file.

public SftpBuilder KnownHostsFile(string path)

MaxAge(IExpression)

Maximum file age from an expression.

public SftpBuilder MaxAge(IExpression ms)

MaxAge(long)

Maximum file age in milliseconds.

public SftpBuilder MaxAge(long ms)

MaxDepth(IExpression)

Maximum recursion depth from an expression.

public SftpBuilder MaxDepth(IExpression depth)

MaxDepth(int)

Maximum recursion depth. 0 = unlimited.

public SftpBuilder MaxDepth(int depth)

MaximumReconnectAttempts(IExpression)

Maximum reconnect attempts from an expression.

public SftpBuilder MaximumReconnectAttempts(IExpression attempts)

MaximumReconnectAttempts(int)

Maximum reconnect attempts. Default 3.

public SftpBuilder MaximumReconnectAttempts(int attempts)

MaxMessagesPerPoll(IExpression)

Max files per poll from an expression.

public SftpBuilder MaxMessagesPerPoll(IExpression max)

MaxMessagesPerPoll(int)

Max files per poll. 0 = unlimited.

public SftpBuilder MaxMessagesPerPoll(int max)

MinAge(IExpression)

Minimum file age from an expression.

public SftpBuilder MinAge(IExpression ms)

MinAge(long)

Minimum file age in milliseconds before processing.

public SftpBuilder MinAge(long ms)

MinDepth(IExpression)

Minimum recursion depth from an expression.

public SftpBuilder MinDepth(IExpression depth)

MinDepth(int)

Minimum recursion depth before yielding files.

public SftpBuilder MinDepth(int depth)

MoveExisting(string)

Strategy when file exists in move target: Override, Append, Fail, Ignore, Move, TryRename.

public SftpBuilder MoveExisting(string strategy)

MoveExistingFileStrategy(string)

Strategy for moving existing files: Backup, Timestamp, Guid.

public SftpBuilder MoveExistingFileStrategy(string strategy)

MoveFailed(IExpression)

Directory for files that failed processing.

public SftpBuilder MoveFailed(IExpression directory)

MoveFailed(string)

Directory for files that failed processing (template string, supports ${...}).

public SftpBuilder MoveFailed(string directory)

MoveTo(IExpression)

Move processed file to this directory.

public SftpBuilder MoveTo(IExpression directory)

MoveTo(string)

Move processed file to this directory (template string, supports ${...}).

public SftpBuilder MoveTo(string directory)

Noop()

Do nothing after processing (leave file in place).

public SftpBuilder Noop()

OperationTimeout(IExpression)

Operation timeout from an expression.

public SftpBuilder OperationTimeout(IExpression ms)

OperationTimeout(int)

Operation timeout in milliseconds. Default 60000.

public SftpBuilder OperationTimeout(int ms)

Password(IExpression)

Password for authentication.

public SftpBuilder Password(IExpression password)

Password(string)

Password for authentication (template string, supports ${...}).

public SftpBuilder Password(string password)

Port(IExpression)

SFTP server port from an expression.

public SftpBuilder Port(IExpression port)

Port(int)

SFTP server port. Default 22.

public SftpBuilder Port(int port)

PreferredAuthentications(string)

Preferred authentication methods, comma-separated.

public SftpBuilder PreferredAuthentications(string methods)

PreMove(IExpression)

Pre-move directory (temporary move before processing).

public SftpBuilder PreMove(IExpression directory)

PreMove(string)

Pre-move directory (template string, supports ${...}).

public SftpBuilder PreMove(string directory)

PrivateKey(IExpression, IExpression?)

Path to private key file.

public SftpBuilder PrivateKey(IExpression path, IExpression? passphrase = null)

Proxy(string, IExpression, int)

Proxy configuration: type (None, Socks4, Socks5, Http), host, and port.

public SftpBuilder Proxy(string type, IExpression host, int port = 1080)

ProxyAuth(IExpression, IExpression)

Proxy authentication.

public SftpBuilder ProxyAuth(IExpression username, IExpression password)

ReconnectDelay(IExpression)

Reconnect delay from an expression.

public SftpBuilder ReconnectDelay(IExpression ms)

ReconnectDelay(int)

Reconnect delay in milliseconds. Default 1000.

public SftpBuilder ReconnectDelay(int ms)

Recursive()

Recurse into subdirectories.

public SftpBuilder Recursive()

SendEmptyMessageWhenIdle()

Send empty message when poll finds no files.

public SftpBuilder SendEmptyMessageWhenIdle()

Separator(string)

Input path normalization: Auto (backslashes become "/") or Unix (byte-for-byte).

public SftpBuilder Separator(string sep)

ServerFingerprint(IExpression)

Expected server host key fingerprint.

public SftpBuilder ServerFingerprint(IExpression fingerprint)

ServerFingerprint(string)

Expected server host key fingerprint (template string, supports ${...}).

public SftpBuilder ServerFingerprint(string fingerprint)

SortBy(string)

Sort order: None, Name, NameDesc, Modified, ModifiedDesc, Size, SizeDesc.

public SftpBuilder SortBy(string sort)

StartingDirectoryMustExist(bool)

Starting directory must exist. Default true.

public SftpBuilder StartingDirectoryMustExist(bool must = true)

StreamBody()

Set exchange body to SftpFileStream instead of byte[] (consumer only).

public SftpBuilder StreamBody()

StrictHostKeyChecking()

Enable strict host key checking.

public SftpBuilder StrictHostKeyChecking()

TempFileName(IExpression)

Temporary file name during write.

public SftpBuilder TempFileName(IExpression name)

TempFileName(string)

Temporary file name during write (template string, supports ${...}).

public SftpBuilder TempFileName(string name)

TempPrefix(IExpression)

Temporary file prefix during write.

public SftpBuilder TempPrefix(IExpression prefix)

TempPrefix(string)

Temporary file prefix during write (template string, supports ${...}).

public SftpBuilder TempPrefix(string prefix)

ToString()

Returns a string that represents the current object.

public override string ToString()

UseKeyboardInteractive()

Enable keyboard-interactive authentication.

public SftpBuilder UseKeyboardInteractive()

Username(IExpression)

Username for authentication.

public SftpBuilder Username(IExpression username)

Username(string)

Username for authentication (template string, supports ${...}).

public SftpBuilder Username(string username)