public class SftpFileSystem extends org.apache.sshd.common.file.util.BaseFileSystem<SftpPath> implements SessionHolder<ClientSession>, ClientSessionHolder
| Modifier and Type | Class and Description |
|---|---|
static class |
SftpFileSystem.DefaultGroupPrincipal |
static class |
SftpFileSystem.DefaultUserPrincipal |
static class |
SftpFileSystem.DefaultUserPrincipalLookupService |
protected static class |
SftpFileSystem.SftpClientHandle
The
SftpFileSystem.SftpClientPool stores SftpClients not directly but via handles in its channel pool. |
protected class |
SftpFileSystem.SftpClientPool
A pool of
SftpClients. |
| Modifier and Type | Field and Description |
|---|---|
static AttributeRepository.AttributeKey<Boolean> |
OWNED_SESSION
An
AttributeRepository.AttributeKey that can be set to Boolean.TRUE on the ClientSession to tell the
SftpFileSystem that it owns that session and should close it when the SftpFileSystem itself is
closed. |
static NavigableSet<String> |
UNIVERSAL_SUPPORTED_VIEWS |
log| Modifier | Constructor and Description |
|---|---|
|
SftpFileSystem(SftpFileSystemProvider provider,
String id,
ClientSession session,
SftpClientFactory factory,
SftpVersionSelector selector,
SftpErrorDataHandler errorDataHandler) |
protected |
SftpFileSystem(SftpFileSystemProvider provider,
String id,
SftpClientFactory factory,
SftpVersionSelector selector,
SftpErrorDataHandler errorDataHandler) |
| Modifier and Type | Method and 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() |
SftpErrorDataHandler |
getSftpErrorDataHandler() |
SftpVersionSelector |
getSftpVersionSelector() |
UserPrincipalLookupService |
getUserPrincipalLookupService() |
int |
getVersion() |
int |
getWriteBufferSize() |
protected void |
init() |
boolean |
isOpen() |
SftpFileSystemProvider |
provider() |
protected ClientSession |
sessionForSftpClient() |
protected void |
setClientSession(ClientSession newSession) |
void |
setReadBufferSize(int size) |
void |
setWriteBufferSize(int size) |
Set<String> |
supportedFileAttributeViews() |
String |
toString() |
appendDedupSep, create, create, getPath, getPathMatcher, getRootDirectories, getSeparator, globToRegex, handleWindowsSeparator, hostFsHasWindowsSeparator, isReadOnly, newWatchServiceclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetSessionContextpublic static final NavigableSet<String> UNIVERSAL_SUPPORTED_VIEWS
public static final AttributeRepository.AttributeKey<Boolean> OWNED_SESSION
AttributeRepository.AttributeKey that can be set to Boolean.TRUE on the ClientSession to tell the
SftpFileSystem that it owns that session and should close it when the SftpFileSystem itself is
closed.public SftpFileSystem(SftpFileSystemProvider provider, String id, ClientSession session, SftpClientFactory factory, SftpVersionSelector selector, SftpErrorDataHandler errorDataHandler) throws IOException
IOExceptionprotected SftpFileSystem(SftpFileSystemProvider provider, String id, SftpClientFactory factory, SftpVersionSelector selector, SftpErrorDataHandler errorDataHandler)
protected void init()
throws IOException
IOExceptionpublic final SftpVersionSelector getSftpVersionSelector()
public SftpErrorDataHandler getSftpErrorDataHandler()
public final String getId()
public final int getVersion()
public SftpFileSystemProvider provider()
provider in class org.apache.sshd.common.file.util.BaseFileSystem<SftpPath>public List<FileStore> getFileStores()
getFileStores in class org.apache.sshd.common.file.util.BaseFileSystem<SftpPath>public int getReadBufferSize()
public void setReadBufferSize(int size)
public int getWriteBufferSize()
public void setWriteBufferSize(int size)
protected SftpPath create(String root, List<String> names)
create in class org.apache.sshd.common.file.util.BaseFileSystem<SftpPath>public ClientSession getClientSession()
getClientSession in interface ClientSessionHolderpublic ClientSession getSession()
getSession in interface SessionHolder<ClientSession>protected void setClientSession(ClientSession newSession)
protected ClientSession sessionForSftpClient() throws IOException
IOExceptionpublic SftpClient getClient() throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FileSystemIOExceptionpublic boolean isOpen()
isOpen in class FileSystempublic Set<String> supportedFileAttributeViews()
supportedFileAttributeViews in class FileSystempublic UserPrincipalLookupService getUserPrincipalLookupService()
getUserPrincipalLookupService in class FileSystempublic SftpPath getDefaultDir()
getDefaultDir in class org.apache.sshd.common.file.util.BaseFileSystem<SftpPath>Copyright © 2018–2024 The Apache Software Foundation. All rights reserved.