public class SpringSftpSession extends org.apache.sshd.common.util.logging.AbstractLoggingBean implements org.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>
log| Constructor and Description |
|---|
SpringSftpSession(SftpClient clientInstance) |
SpringSftpSession(SftpClient clientInstance,
Callable<Exception> sessionCloser) |
| Modifier and Type | Method and Description |
|---|---|
void |
append(InputStream inputStream,
String destination) |
void |
close() |
protected void |
closeClientInstance(SftpClient client) |
protected void |
closeSessionInstance(Callable<Exception> closer) |
boolean |
exists(String path) |
boolean |
finalizeRaw() |
SftpClient |
getClientInstance() |
Callable<Exception> |
getSessionCloser() |
boolean |
isOpen() |
SftpClient.DirEntry[] |
list(String path) |
String[] |
listNames(String path) |
boolean |
mkdir(String directory) |
void |
read(String source,
OutputStream outputStream) |
InputStream |
readRaw(String source) |
boolean |
remove(String path) |
void |
rename(String pathFrom,
String pathTo) |
boolean |
rmdir(String directory) |
String |
toString() |
void |
write(InputStream inputStream,
String destination) |
getSimplifiedLoggerpublic SpringSftpSession(SftpClient clientInstance)
public SpringSftpSession(SftpClient clientInstance, Callable<Exception> sessionCloser)
public boolean isOpen()
isOpen in interface org.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>public SftpClient getClientInstance()
getClientInstance in interface org.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>public void close()
close in interface Closeableclose in interface AutoCloseableclose in interface org.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>protected void closeClientInstance(SftpClient client) throws Exception
Exceptionprotected void closeSessionInstance(Callable<Exception> closer) throws Exception
Exceptionpublic boolean remove(String path) throws IOException
remove in interface org.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>IOExceptionpublic boolean mkdir(String directory) throws IOException
mkdir in interface org.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>IOExceptionpublic boolean rmdir(String directory) throws IOException
rmdir in interface org.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>IOExceptionpublic void rename(String pathFrom, String pathTo) throws IOException
rename in interface org.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>IOExceptionpublic boolean exists(String path) throws IOException
exists in interface org.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>IOExceptionpublic String[] listNames(String path) throws IOException
listNames in interface org.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>IOExceptionpublic SftpClient.DirEntry[] list(String path) throws IOException
list in interface org.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>IOExceptionpublic void read(String source, OutputStream outputStream) throws IOException
read in interface org.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>IOExceptionpublic void write(InputStream inputStream, String destination) throws IOException
write in interface org.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>IOExceptionpublic void append(InputStream inputStream, String destination) throws IOException
append in interface org.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>IOExceptionpublic InputStream readRaw(String source) throws IOException
readRaw in interface org.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>IOExceptionpublic boolean finalizeRaw()
throws IOException
finalizeRaw in interface org.springframework.integration.file.remote.session.Session<SftpClient.DirEntry>IOExceptionCopyright © 2017–2019 The Apache Software Foundation. All rights reserved.