public class SftpFileSystem extends BaseFileSystem<SftpPath> implements SessionHolder<ClientSession>, ClientSessionHolder
Modifier and Type | Class and Description |
---|---|
static class |
SftpFileSystem.DefaultGroupPrincipal |
static class |
SftpFileSystem.DefaultUserPrincipal |
static class |
SftpFileSystem.DefaultUserPrincipalLookupService |
private class |
SftpFileSystem.Wrapper |
Modifier and Type | Field and Description |
---|---|
private ClientSession |
clientSession |
static int |
DEFAULT_POOL_SIZE |
private SftpPath |
defaultDir |
private SftpClientFactory |
factory |
private java.lang.String |
id |
private java.util.Queue<SftpClient> |
pool |
static java.lang.String |
POOL_SIZE_PROP |
private int |
readBufferSize |
private SftpVersionSelector |
selector |
private java.util.List<java.nio.file.FileStore> |
stores |
private java.util.Set<java.lang.String> |
supportedViews |
static java.util.NavigableSet<java.lang.String> |
UNIVERSAL_SUPPORTED_VIEWS |
private int |
version |
private java.lang.ThreadLocal<SftpFileSystem.Wrapper> |
wrappers |
private int |
writeBufferSize |
log
Constructor and Description |
---|
SftpFileSystem(SftpFileSystemProvider provider,
java.lang.String id,
ClientSession session,
SftpClientFactory factory,
SftpVersionSelector selector) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected SftpPath |
create(java.lang.String root,
java.util.List<java.lang.String> names) |
SftpClient |
getClient() |
ClientSession |
getClientSession() |
SftpPath |
getDefaultDir() |
java.util.List<java.nio.file.FileStore> |
getFileStores() |
java.lang.String |
getId() |
int |
getReadBufferSize() |
ClientSession |
getSession() |
SftpVersionSelector |
getSftpVersionSelector() |
java.nio.file.attribute.UserPrincipalLookupService |
getUserPrincipalLookupService() |
int |
getVersion() |
int |
getWriteBufferSize() |
boolean |
isOpen() |
SftpFileSystemProvider |
provider() |
void |
setReadBufferSize(int size) |
void |
setWriteBufferSize(int size) |
java.util.Set<java.lang.String> |
supportedFileAttributeViews() |
java.lang.String |
toString() |
appendDedupSep, create, create, getPath, getPathMatcher, getRootDirectories, getSeparator, globToRegex, isReadOnly, newWatchService
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getSessionContext
public static final java.lang.String POOL_SIZE_PROP
public static final int DEFAULT_POOL_SIZE
public static final java.util.NavigableSet<java.lang.String> UNIVERSAL_SUPPORTED_VIEWS
private final java.lang.String id
private final ClientSession clientSession
private final SftpClientFactory factory
private final SftpVersionSelector selector
private final java.util.Queue<SftpClient> pool
private final java.lang.ThreadLocal<SftpFileSystem.Wrapper> wrappers
private final int version
private final java.util.Set<java.lang.String> supportedViews
private SftpPath defaultDir
private int readBufferSize
private int writeBufferSize
private final java.util.List<java.nio.file.FileStore> stores
public SftpFileSystem(SftpFileSystemProvider provider, java.lang.String id, ClientSession session, SftpClientFactory factory, SftpVersionSelector selector) throws java.io.IOException
java.io.IOException
public final SftpVersionSelector getSftpVersionSelector()
public final java.lang.String getId()
public final int getVersion()
public SftpFileSystemProvider provider()
provider
in class BaseFileSystem<SftpPath>
public java.util.List<java.nio.file.FileStore> getFileStores()
getFileStores
in class BaseFileSystem<SftpPath>
public int getReadBufferSize()
public void setReadBufferSize(int size)
public int getWriteBufferSize()
public void setWriteBufferSize(int size)
protected SftpPath create(java.lang.String root, java.util.List<java.lang.String> names)
create
in class BaseFileSystem<SftpPath>
public ClientSession getClientSession()
getClientSession
in interface ClientSessionHolder
ClientSession
usedpublic ClientSession getSession()
getSession
in interface SessionHolder<ClientSession>
public SftpClient getClient() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.nio.file.FileSystem
java.io.IOException
public boolean isOpen()
isOpen
in class java.nio.file.FileSystem
public java.util.Set<java.lang.String> supportedFileAttributeViews()
supportedFileAttributeViews
in class java.nio.file.FileSystem
public java.nio.file.attribute.UserPrincipalLookupService getUserPrincipalLookupService()
getUserPrincipalLookupService
in class java.nio.file.FileSystem
public SftpPath getDefaultDir()
getDefaultDir
in class BaseFileSystem<SftpPath>
public java.lang.String toString()
toString
in class java.lang.Object