java.lang.Object
org.springframework.integration.smb.session.SmbConfig
Direct Known Subclasses:
SmbSessionFactory

public class SmbConfig extends Object
Data holder class for an SMB share configuration.

SmbFile URLs syntax: smb://[[[domain;]username[:password]@]server[:port]/[[share/[dir/]file]]][?[param=value[param2=value2[...]]]

Since:
6.0
Author:
Markus Spann, Prafull Kumar Soni, Artem Bilan, Gregory Bragg, Jelle Smits
  • Constructor Details

    • SmbConfig

      public SmbConfig()
    • SmbConfig

      public SmbConfig(String _host, int _port, String _domain, String _username, String _password, String _shareAndDir)
  • Method Details

    • setHost

      public final void setHost(String _host)
    • getHost

      public String getHost()
    • setPort

      public final void setPort(int _port)
    • getPort

      public int getPort()
    • setDomain

      public final void setDomain(String _domain)
    • getDomain

      public String getDomain()
    • setUsername

      public final void setUsername(String _username)
    • getUsername

      public String getUsername()
    • setPassword

      public final void setPassword(String _password)
    • getPassword

      public String getPassword()
    • setShareAndDir

      public final void setShareAndDir(String _shareAndDir)
    • getShareAndDir

      public String getShareAndDir()
    • getSmbMinVersion

      public jcifs.DialectVersion getSmbMinVersion()
      Gets the desired minimum SMB version value for what the Windows server will allow during protocol transport negotiation.
      Returns:
      one of SMB1, SMB202, SMB210, SMB300, SMB302 or SMB311
    • setSmbMinVersion

      public void setSmbMinVersion(jcifs.DialectVersion _smbMinVersion)
      Sets the desired minimum SMB version value for what the Windows server will allow during protocol transport negotiation.
      Parameters:
      _smbMinVersion - one of SMB1, SMB202, SMB210, SMB300, SMB302 or SMB311
    • getSmbMaxVersion

      public jcifs.DialectVersion getSmbMaxVersion()
      Gets the desired maximum SMB version value for what the Windows server will allow during protocol transport negotiation.
      Returns:
      one of SMB1, SMB202, SMB210, SMB300, SMB302 or SMB311
    • setSmbMaxVersion

      public void setSmbMaxVersion(jcifs.DialectVersion _smbMaxVersion)
      Sets the desired maximum SMB version value for what the Windows server will allow during protocol transport negotiation.
      Parameters:
      _smbMaxVersion - one of SMB1, SMB202, SMB210, SMB300, SMB302 or SMB311
    • validate

      public final SmbConfig validate()
      Validates the object. Throws run-time exception if found to be invalid.
      Returns:
      the object
    • getUrl

      public final String getUrl()
    • getUrl

      public final String getUrl(boolean _includePassword)
    • rawUrl

      public final String rawUrl()
      Return the url string for the share connection without encoding. Used in the SmbShare constructor delegation.
      Returns:
      the url string for the share connection without encoding.
      Since:
      6.3.8
    • rawUrl

      public final String rawUrl(boolean _includePassword)
      Return the url string for the share connection without encoding the host and path. The domainUserPass is encoded, as URL requires them to be encoded otherwise its parsing fails. Used in the SmbShare constructor delegation.
      Parameters:
      _includePassword - whether password has to be masked in credentials of URL.
      Returns:
      the url string for the share connection without encoding.
      Since:
      6.3.8
    • toString

      public String toString()
      Overrides:
      toString in class Object