Class SmbRemoteFileTemplate

java.lang.Object
org.springframework.integration.file.remote.RemoteFileTemplate<jcifs.smb.SmbFile>
org.springframework.integration.smb.session.SmbRemoteFileTemplate
All Implemented Interfaces:
Aware, BeanFactoryAware, InitializingBean, RemoteFileOperations<jcifs.smb.SmbFile>

public class SmbRemoteFileTemplate extends RemoteFileTemplate<jcifs.smb.SmbFile>
The SMB-specific RemoteFileTemplate implementation.
Since:
6.0
Author:
Artem Bilan
  • Field Details

    • NOT_DIRTY_STATUSES

      protected static final List<Integer> NOT_DIRTY_STATUSES
  • Constructor Details

    • SmbRemoteFileTemplate

      public SmbRemoteFileTemplate(SessionFactory<jcifs.smb.SmbFile> sessionFactory)
      Construct a SmbRemoteFileTemplate with the supplied session factory.
      Parameters:
      sessionFactory - the session factory.
  • Method Details

    • shouldMarkSessionAsDirty

      protected boolean shouldMarkSessionAsDirty(Exception ex)
      Description copied from class: RemoteFileTemplate
      Determine whether Session.dirty() should be called in the RemoteFileTemplate.execute(SessionCallback) when an exception is thrown from the callback. By default, this method returns true. Remote file protocol extensions can override this method to provide a specific strategy against the thrown exception, e.g. file not found error is not a signal that session is broken.
      Overrides:
      shouldMarkSessionAsDirty in class RemoteFileTemplate<jcifs.smb.SmbFile>
      Parameters:
      ex - the exception to check if Session must be marked as dirty.
      Returns:
      true if Session.dirty() should be called.
    • isStatusDirty

      protected boolean isStatusDirty(int status)
      Check if SmbException.getNtStatus() is treated as fatal.
      Parameters:
      status - the value from SmbException.getNtStatus().
      Returns:
      true if SmbException.getNtStatus() is treated as fatal.
      Since:
      6.0.8