Package org.apache.sshd.sftp.client.fs
Class SftpFileSystemAutomatic
- java.lang.Object
-
- java.nio.file.FileSystem
-
- org.apache.sshd.common.file.util.BaseFileSystem<SftpPath>
-
- org.apache.sshd.sftp.client.fs.SftpFileSystem
-
- org.apache.sshd.sftp.client.fs.SftpFileSystemAutomatic
-
- All Implemented Interfaces:
Closeable,AutoCloseable,ClientSessionHolder,SessionContextHolder,SessionHolder<ClientSession>
public class SftpFileSystemAutomatic extends SftpFileSystem
AnSftpFileSystemthat uses a provider function for itsClientSessionso that it can continue to function even if a session was closed. The provider is supposed to create a new session if the current one is not open.- Author:
- Apache MINA SSHD Project
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.sshd.sftp.client.fs.SftpFileSystem
SftpFileSystem.DefaultGroupPrincipal, SftpFileSystem.DefaultUserPrincipal, SftpFileSystem.DefaultUserPrincipalLookupService, SftpFileSystem.SftpClientHandle, SftpFileSystem.SftpClientPool
-
-
Field Summary
-
Fields inherited from class org.apache.sshd.sftp.client.fs.SftpFileSystem
OWNED_SESSION, UNIVERSAL_SUPPORTED_VIEWS
-
-
Constructor Summary
Constructors Constructor Description SftpFileSystemAutomatic(SftpFileSystemProvider provider, String id, org.apache.sshd.common.util.io.functors.IOFunction<Boolean,ClientSession> sessionProvider, SftpClientFactory factory, SftpVersionSelector selector, SftpErrorDataHandler errorDataHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientSessiongetClientSession()protected ClientSessionsessionForSftpClient()-
Methods inherited from class org.apache.sshd.sftp.client.fs.SftpFileSystem
close, create, getClient, getDefaultDir, getFileStores, getId, getReadBufferSize, getSession, getSftpErrorDataHandler, getSftpVersionSelector, getUserPrincipalLookupService, getVersion, getWriteBufferSize, init, isOpen, provider, setClientSession, setReadBufferSize, setWriteBufferSize, supportedFileAttributeViews, toString
-
Methods inherited from class org.apache.sshd.common.file.util.BaseFileSystem
appendDedupSep, create, create, getPath, getPathMatcher, getRootDirectories, getSeparator, globToRegex, handleWindowsSeparator, hostFsHasWindowsSeparator, isReadOnly, newWatchService
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.sshd.common.session.SessionHolder
getSessionContext
-
-
-
-
Constructor Detail
-
SftpFileSystemAutomatic
public SftpFileSystemAutomatic(SftpFileSystemProvider provider, String id, org.apache.sshd.common.util.io.functors.IOFunction<Boolean,ClientSession> sessionProvider, SftpClientFactory factory, SftpVersionSelector selector, SftpErrorDataHandler errorDataHandler) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getClientSession
public ClientSession getClientSession()
- Specified by:
getClientSessionin interfaceClientSessionHolder- Overrides:
getClientSessionin classSftpFileSystem
-
sessionForSftpClient
protected ClientSession sessionForSftpClient() throws IOException
- Overrides:
sessionForSftpClientin classSftpFileSystem- Throws:
IOException
-
-