Class SftpRemoteFileTemplate
java.lang.Object
org.springframework.integration.file.remote.RemoteFileTemplate<org.apache.sshd.sftp.client.SftpClient.DirEntry>
org.springframework.integration.sftp.session.SftpRemoteFileTemplate
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.InitializingBean,org.springframework.integration.file.remote.RemoteFileOperations<org.apache.sshd.sftp.client.SftpClient.DirEntry>
public class SftpRemoteFileTemplate
extends org.springframework.integration.file.remote.RemoteFileTemplate<org.apache.sshd.sftp.client.SftpClient.DirEntry>
SFTP version of
RemoteFileTemplate providing type-safe access to
the underlying ChannelSftp object.- Since:
- 4.1
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.integration.file.remote.RemoteFileOperations
org.springframework.integration.file.remote.RemoteFileOperations.OperationsCallback<F,T> -
Field Summary
FieldsFields inherited from class org.springframework.integration.file.remote.RemoteFileTemplate
logger, sessionFactory -
Constructor Summary
ConstructorsConstructorDescriptionSftpRemoteFileTemplate(org.springframework.integration.file.remote.session.SessionFactory<org.apache.sshd.sftp.client.SftpClient.DirEntry> sessionFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> @Nullable TdoExecuteWithClient(org.springframework.integration.file.remote.ClientCallback<org.apache.sshd.sftp.client.SftpClient, T> callback) <T,C> @Nullable T executeWithClient(org.springframework.integration.file.remote.ClientCallback<C, T> callback) protected booleanisStatusDirty(int status) Check ifSftpException.getStatus()is treated as fatal.protected booleanMethods inherited from class org.springframework.integration.file.remote.RemoteFileTemplate
afterPropertiesSet, append, append, execute, exists, get, get, getDirectoryExpressionProcessor, getRemoteFileSeparator, getSession, getSessionFactory, getTemporaryFileSuffix, invoke, isUseTemporaryFileName, list, remove, rename, send, send, setAutoCreateDirectory, setBeanFactory, setCharset, setFileNameExpression, setFileNameGenerator, setRemoteDirectoryExpression, setRemoteFileSeparator, setTemporaryFileSuffix, setTemporaryRemoteDirectoryExpression, setUseTemporaryFileName
-
Field Details
-
NOT_DIRTY_STATUSES
-
-
Constructor Details
-
SftpRemoteFileTemplate
public SftpRemoteFileTemplate(org.springframework.integration.file.remote.session.SessionFactory<org.apache.sshd.sftp.client.SftpClient.DirEntry> sessionFactory)
-
-
Method Details
-
executeWithClient
public <T,C> @Nullable T executeWithClient(org.springframework.integration.file.remote.ClientCallback<C, T> callback) - Specified by:
executeWithClientin interfaceorg.springframework.integration.file.remote.RemoteFileOperations<org.apache.sshd.sftp.client.SftpClient.DirEntry>- Overrides:
executeWithClientin classorg.springframework.integration.file.remote.RemoteFileTemplate<org.apache.sshd.sftp.client.SftpClient.DirEntry>
-
doExecuteWithClient
protected <T> @Nullable T doExecuteWithClient(org.springframework.integration.file.remote.ClientCallback<org.apache.sshd.sftp.client.SftpClient, T> callback) -
shouldMarkSessionAsDirty
- Overrides:
shouldMarkSessionAsDirtyin classorg.springframework.integration.file.remote.RemoteFileTemplate<org.apache.sshd.sftp.client.SftpClient.DirEntry>
-
isStatusDirty
protected boolean isStatusDirty(int status) Check ifSftpException.getStatus()is treated as fatal.- Parameters:
status- the value fromSftpException.getStatus().- Returns:
- true if
SftpException.getStatus()is treated as fatal. - Since:
- 6.0.8
-