Class SpringSftpSession
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.sftp.spring.integration.SpringSftpSession
- All Implemented Interfaces:
Closeable,AutoCloseable,org.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>
public class SpringSftpSession
extends org.apache.sshd.common.util.logging.AbstractLoggingBean
implements org.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>
Implements the Spring session for the SFTP client
- Author:
- Apache MINA SSHD Project
-
Field Summary
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log -
Constructor Summary
ConstructorsConstructorDescriptionSpringSftpSession(SftpClient clientInstance) SpringSftpSession(SftpClient clientInstance, Callable<Exception> sessionCloser) -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(InputStream inputStream, String destination) voidclose()protected voidcloseClientInstance(SftpClient client) protected voidcloseSessionInstance(Callable<Exception> closer) booleanbooleanbooleanisOpen()String[]booleanvoidread(String source, OutputStream outputStream) booleanvoidbooleantoString()voidwrite(InputStream inputStream, String destination) Methods 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.springframework.integration.file.remote.session.Session
dirty, test
-
Constructor Details
-
SpringSftpSession
-
SpringSftpSession
-
-
Method Details
-
getHostPort
- Specified by:
getHostPortin interfaceorg.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>
-
isOpen
public boolean isOpen()- Specified by:
isOpenin interfaceorg.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>
-
getClientInstance
- Specified by:
getClientInstancein interfaceorg.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>
-
getSessionCloser
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>
-
closeClientInstance
- Throws:
Exception
-
closeSessionInstance
- Throws:
Exception
-
remove
- Specified by:
removein interfaceorg.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>- Throws:
IOException
-
mkdir
- Specified by:
mkdirin interfaceorg.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>- Throws:
IOException
-
rmdir
- Specified by:
rmdirin interfaceorg.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>- Throws:
IOException
-
rename
- Specified by:
renamein interfaceorg.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>- Throws:
IOException
-
exists
- Specified by:
existsin interfaceorg.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>- Throws:
IOException
-
listNames
- Specified by:
listNamesin interfaceorg.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>- Throws:
IOException
-
list
- Specified by:
listin interfaceorg.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>- Throws:
IOException
-
read
- Specified by:
readin interfaceorg.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>- Throws:
IOException
-
write
- Specified by:
writein interfaceorg.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>- Throws:
IOException
-
append
- Specified by:
appendin interfaceorg.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>- Throws:
IOException
-
readRaw
- Specified by:
readRawin interfaceorg.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>- Throws:
IOException
-
finalizeRaw
- Specified by:
finalizeRawin interfaceorg.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>- Throws:
IOException
-
toString
-