Class RemoteFileProducer<TOptions>
Base class for remote file producers (SFTP, FTP). Extends
with connection lifecycle management: auto-connect before write, reconnect on failure,
disconnect after write if configured.
public abstract class RemoteFileProducer<TOptions> : GenericFileProducer<TOptions>, IProducer, IProcessor where TOptions : RemoteFileEndpointOptions
Inheritance
Implements
Properties
RemoteOperations
Remote file operations with connection lifecycle.
protected IRemoteFileOperations RemoteOperations { get; }
Methods
BeforeWriteAsync(string, CancellationToken)
Connects to the remote server and auto-creates the target directory if configured.
protected override Task BeforeWriteAsync(string targetDir, CancellationToken ct)
EnsureConnectedAsync(CancellationToken)
Ensures a connection is active, reconnecting with retry if necessary.
protected Task EnsureConnectedAsync(CancellationToken ct)
OnWriteCompletedAsync(IExchange, string, CancellationToken)
Disconnects from the remote server if the Disconnect option is set.
protected override Task OnWriteCompletedAsync(IExchange exchange, string targetPath, CancellationToken ct)
Constructors
RemoteFileProducer(IEndpoint, TOptions, IRemoteFileOperations)
Creates a remote file producer.