Class SftpFileSystem
- java.lang.Object
-
- java.nio.file.FileSystem
-
- org.apache.sshd.common.file.util.BaseFileSystem<SftpPath>
-
- org.apache.sshd.client.subsystem.sftp.fs.SftpFileSystem
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,ClientSessionHolder
,SessionContextHolder
,SessionHolder<ClientSession>
public class SftpFileSystem extends BaseFileSystem<SftpPath> implements SessionHolder<ClientSession>, ClientSessionHolder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SftpFileSystem.DefaultGroupPrincipal
static class
SftpFileSystem.DefaultUserPrincipal
static class
SftpFileSystem.DefaultUserPrincipalLookupService
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_POOL_SIZE
static String
POOL_SIZE_PROP
static NavigableSet<String>
UNIVERSAL_SUPPORTED_VIEWS
-
Fields inherited from class org.apache.sshd.common.file.util.BaseFileSystem
log
-
-
Constructor Summary
Constructors Constructor Description SftpFileSystem(SftpFileSystemProvider provider, String id, ClientSession session, SftpClientFactory factory, SftpVersionSelector selector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected SftpPath
create(String root, List<String> names)
SftpClient
getClient()
ClientSession
getClientSession()
SftpPath
getDefaultDir()
List<FileStore>
getFileStores()
String
getId()
int
getReadBufferSize()
ClientSession
getSession()
SftpVersionSelector
getSftpVersionSelector()
UserPrincipalLookupService
getUserPrincipalLookupService()
int
getVersion()
int
getWriteBufferSize()
boolean
isOpen()
SftpFileSystemProvider
provider()
void
setReadBufferSize(int size)
void
setWriteBufferSize(int size)
Set<String>
supportedFileAttributeViews()
String
toString()
-
Methods inherited from class org.apache.sshd.common.file.util.BaseFileSystem
appendDedupSep, create, create, getPath, getPathMatcher, getRootDirectories, getSeparator, globToRegex, 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
-
-
-
-
Field Detail
-
POOL_SIZE_PROP
public static final String POOL_SIZE_PROP
- See Also:
- Constant Field Values
-
DEFAULT_POOL_SIZE
public static final int DEFAULT_POOL_SIZE
- See Also:
- Constant Field Values
-
UNIVERSAL_SUPPORTED_VIEWS
public static final NavigableSet<String> UNIVERSAL_SUPPORTED_VIEWS
-
-
Constructor Detail
-
SftpFileSystem
public SftpFileSystem(SftpFileSystemProvider provider, String id, ClientSession session, SftpClientFactory factory, SftpVersionSelector selector) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getSftpVersionSelector
public final SftpVersionSelector getSftpVersionSelector()
-
getId
public final String getId()
-
getVersion
public final int getVersion()
-
provider
public SftpFileSystemProvider provider()
- Overrides:
provider
in classBaseFileSystem<SftpPath>
-
getFileStores
public List<FileStore> getFileStores()
- Overrides:
getFileStores
in classBaseFileSystem<SftpPath>
-
getReadBufferSize
public int getReadBufferSize()
-
setReadBufferSize
public void setReadBufferSize(int size)
-
getWriteBufferSize
public int getWriteBufferSize()
-
setWriteBufferSize
public void setWriteBufferSize(int size)
-
create
protected SftpPath create(String root, List<String> names)
- Specified by:
create
in classBaseFileSystem<SftpPath>
-
getClientSession
public ClientSession getClientSession()
- Specified by:
getClientSession
in interfaceClientSessionHolder
- Returns:
- The underlying
ClientSession
used
-
getSession
public ClientSession getSession()
- Specified by:
getSession
in interfaceSessionHolder<ClientSession>
-
getClient
public SftpClient getClient() throws IOException
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classFileSystem
- Throws:
IOException
-
isOpen
public boolean isOpen()
- Specified by:
isOpen
in classFileSystem
-
supportedFileAttributeViews
public Set<String> supportedFileAttributeViews()
- Specified by:
supportedFileAttributeViews
in classFileSystem
-
getUserPrincipalLookupService
public UserPrincipalLookupService getUserPrincipalLookupService()
- Specified by:
getUserPrincipalLookupService
in classFileSystem
-
getDefaultDir
public SftpPath getDefaultDir()
- Overrides:
getDefaultDir
in classBaseFileSystem<SftpPath>
-
-