Package org.apache.sshd.sftp.client.fs
Class SftpFileSystem.Wrapper
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.client.subsystem.AbstractSubsystemClient
org.apache.sshd.sftp.client.impl.AbstractSftpClient
org.apache.sshd.sftp.client.fs.SftpFileSystem.DelegatingClient
org.apache.sshd.sftp.client.fs.SftpFileSystem.Wrapper
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel,ClientChannelHolder,ClientSessionHolder,SubsystemClient,ChannelHolder,NamedResource,SessionContextHolder,SessionHolder<ClientSession>,FullAccessSftpClient,RawSftpClient,SftpClient,SftpErrorDataHandler
- Enclosing class:
SftpFileSystem
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.sshd.sftp.client.SftpClient
SftpClient.Attribute, SftpClient.Attributes, SftpClient.CloseableHandle, SftpClient.CopyMode, SftpClient.DirEntry, SftpClient.Handle, SftpClient.OpenMode -
Field Summary
FieldsFields inherited from class org.apache.sshd.sftp.client.fs.SftpFileSystem.DelegatingClient
delegateFields inherited from class org.apache.sshd.sftp.client.impl.AbstractSftpClient
errorDataHandler, INIT_COMMAND_SIZE, SFTP_CLIENT_CMD_TIMEOUTFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
logFields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTORFields inherited from interface org.apache.sshd.sftp.client.SftpClient
DEFAULT_CHANNEL_MODES, EMPTY_DIR_ENTRIES, IO_BUFFER_SIZE, MIN_BUFFER_SIZE, MIN_READ_BUFFER_SIZE, MIN_WRITE_BUFFER_SIZEFields inherited from interface org.apache.sshd.sftp.client.SftpErrorDataHandler
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionWrapper(SftpClient delegate, SftpErrorDataHandler errorHandler, int readSize, int writeSize) -
Method Summary
Methods inherited from class org.apache.sshd.sftp.client.fs.SftpFileSystem.DelegatingClient
canonicalPath, close, getClientChannel, getClientSession, getNameDecodingCharset, getServerExtensions, getVersion, link, listDir, lock, lstat, mkdir, open, openDir, put, put, put, put, put, put, read, read, read, read, readDir, readDir, readLink, receive, receive, receive, remove, rename, rmdir, send, setNameDecodingCharset, setStat, setStat, stat, stat, symLink, unlock, write, write, write, write, writeMethods inherited from class org.apache.sshd.sftp.client.impl.AbstractSftpClient
checkAttributes, checkAttributesResponse, checkCommandStatus, checkDataResponse, checkDirResponse, checkHandle, checkHandleResponse, checkOneName, checkOneNameResponse, checkResponseStatus, checkResponseStatus, errorData, getChannel, getExtension, getExtension, getParsedServerExtensions, getParsedServerExtensions, getReadBufferSize, getReferencedName, getWriteBufferSize, handleUnexpectedAttributesPacket, handleUnexpectedHandlePacket, handleUnexpectedPacket, handleUnknownDataPacket, handleUnknownDirListingPacket, handleUnknownOneNamePacket, openRemoteFileChannel, put, putReferencedName, read, read, readAttributes, readDir, response, rpc, throwStatusException, write, writeAttributesMethods inherited from class org.apache.sshd.client.subsystem.AbstractSubsystemClient
toStringMethods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.sshd.common.session.SessionHolder
getSessionContextMethods inherited from interface org.apache.sshd.sftp.client.SftpClient
getExtension, getName, open, open, openRemoteFileChannel, openRemotePathChannel, openRemotePathChannel, put, put, put, put, put, read, read, read, read, readEntries, rename, rename, singleSessionInstance, write, write, writeMethods inherited from interface org.apache.sshd.client.subsystem.SubsystemClient
getSession
-
Field Details
-
open
-
-
Constructor Details
-
Wrapper
Wrapper(SftpClient delegate, SftpErrorDataHandler errorHandler, int readSize, int writeSize)
-
-
Method Details
-
isClosing
public boolean isClosing()- Specified by:
isClosingin interfaceSftpClient- Overrides:
isClosingin classSftpFileSystem.DelegatingClient
-
isOpen
public boolean isOpen()- Specified by:
isOpenin interfaceChannel- Overrides:
isOpenin classSftpFileSystem.DelegatingClient
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Overrides:
closein classSftpFileSystem.DelegatingClient- Throws:
IOException
-