Class SftpFileSystem.Wrapper

All Implemented Interfaces:
Closeable, AutoCloseable, Channel, ClientChannelHolder, ClientSessionHolder, SubsystemClient, ChannelHolder, NamedResource, SessionContextHolder, SessionHolder<ClientSession>, FullAccessSftpClient, RawSftpClient, SftpClient, SftpErrorDataHandler
Enclosing class:
SftpFileSystem

private class SftpFileSystem.Wrapper extends SftpFileSystem.DelegatingClient
The file system hands out only Wrapper instances to prevent the underlying SftpClient from being closed. The real SftpClient used will be closed when the SftpFileSystem is closed, or if the server terminates the channel, or the session is closed. In the latter two cases, operations using the old underlying SftpClient may fail. Subsequent operations on a non-closed SftpFileSystem will re-create an SftpClient (channel) and also an SSH session, if needed, and perform the operations on that new SftpClient.