Package jcifs.config
Class DelegatingConfiguration
- java.lang.Object
-
- jcifs.config.DelegatingConfiguration
-
- All Implemented Interfaces:
Configuration
public class DelegatingConfiguration extends Object implements Configuration
- Author:
- mbechler
-
-
Constructor Summary
Constructors Constructor Description DelegatingConfiguration(Configuration delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description long
getAttributeCacheTimeout()
Property jcifs.smb.client.attrExpirationPeriod (int, 5000)int
getBatchLimit(String cmd)
InetAddress
getBroadcastAddress()
Property jcifs.netbios.baddr (string, default 255.255.255.255)int
getBufferCacheSize()
Property jcifs.smb.maxBuffers (int, default 16)int
getCapabilities()
Property jcifs.smb.client.capabilities (int)int
getConnTimeout()
Property jcifs.smb.client.connTimeout (int, default 35000)String
getDefaultDomain()
Property jcifs.smb.client.domainString
getDefaultPassword()
Property jcifs.smb.client.passwordString
getDefaultUsername()
Property jcifs.smb.client.usernamelong
getDfsTtl()
Property jcifs.smb.client.dfs.ttl (int, default 300)int
getFlags2()
Property jcifs.smb.client.flags2 (int)String
getGuestPassword()
Property jcifs.smb.client.guestPassword, defaults to empty stringString
getGuestUsername()
Property jcifs.smb.client.guestUsername, defaults to GUESTint
getLanManCompatibility()
Lanman compatibility level 0 or 1 LM and NTLM 2 NTLM only 3-5 NTLMv2 only Property jcifs.smb.lmCompatibility (int, default 3)int
getListCount()
Property jcifs.smb.client.listCount (int, default 200)int
getListSize()
Property jcifs.smb.client.listSize (int, default 65435)String
getLmHostsFileName()
Property jcifs.netbios.lmhosts (string)InetAddress
getLocalAddr()
Property jcifs.smb.client.laddr (string)int
getLocalPort()
Property jcifs.smb.client.lport (int)TimeZone
getLocalTimezone()
String
getLogonShare()
Property jcifs.smb.client.logonSharebyte[]
getMachineId()
Machine identifier ClientGuid, ...int
getMaximumBufferSize()
DialectVersion
getMaximumVersion()
Maximum protocol version Property jcifs.smb.client.maxVersion (string, default SMB210)int
getMaxMpxCount()
Property jcifs.smb.client.maxMpxCount (int, default 10)int
getMaxRequestRetries()
Property jcifs.smb.client.maxRequestRetries (int, default 2)DialectVersion
getMinimumVersion()
Minimum protocol version Property jcifs.smb.client.minVersion (string, default SMB1)String
getNativeLanman()
Property jcifs.smb.client.nativeLanMan (string, default jCIFS)String
getNativeOs()
Property jcifs.smb.client.nativeOs (string, default os.name)int
getNetbiosCachePolicy()
Property jcifs.netbios.cachePolicy in minutes (int, default 600)String
getNetbiosHostname()
Property jcifs.netbios.hostname (string)InetAddress
getNetbiosLocalAddress()
Property jcifs.netbios.laddr (string)int
getNetbiosLocalPort()
Property jcifs.netbios.lport (int)int
getNetbiosRcvBufSize()
Property jcifs.netbios.rcv_buf_size (int, default 576)int
getNetbiosRetryCount()
Property jcifs.netbios.retryCount (int, default 2)int
getNetbiosRetryTimeout()
Property jcifs.netbios.retryTimeout (int, default 3000)String
getNetbiosScope()
Property jcifs.netbios.scope (string)int
getNetbiosSndBufSize()
Property jcifs.netbios.snd_buf_size (int, default 576)int
getNetbiosSoTimeout()
Property jcifs.netbios.soTimeout (int, default 5000)int
getNotifyBufferSize()
Property jcifs.smb.client.notify_buf_size (int, default 1024)String
getOemEncoding()
Property jcifs.encoding (string, default Cp850)int
getPid()
SecureRandom
getRandom()
int
getReceiveBufferSize()
Property jcifs.smb.client.rcv_buf_size (int, default 65535)int
getRecieveBufferSize()
Deprecated.use getReceiveBufferSize insteadList<ResolverType>
getResolveOrder()
Property jcifs.resolveOrder (string, default LMHOSTS,DNS,WINS,BCAST)int
getResponseTimeout()
Property jcifs.smb.client.responseTimeout (int, default 30000)int
getSendBufferSize()
Property jcifs.smb.client.snd_buf_size (int, default 65535)int
getSessionLimit()
Property jcifs.smb.client.ssnLimit (int, 250)int
getSessionTimeout()
Property jcifs.smb.client.sessionTimeout (int, default 35000)int
getSoTimeout()
Property jcifs.smb.client.soTimeout (int, default 35000)int
getTransactionBufferSize()
Property jcifs.smb.client.transaction_buf_size (int, default 65535)int
getVcNumber()
InetAddress[]
getWinsServers()
Property jcifs.netbios.wins (string, comma separated)boolean
isAllowCompound(String command)
boolean
isAllowGuestFallback()
Property jcifs.smb.client.allowGuestFallback, defaults to falseboolean
isAllowNTLMFallback()
Property jcifs.smb.allowNTLMFallback (boolean, default true)boolean
isDfsConvertToFQDN()
Enable hack to make kerberos auth work with DFS sending short names This works by appending the domain name to the netbios short name and will fail horribly if this mapping is not correct for your domain.boolean
isDfsDisabled()
Property jcifs.smb.client.dfs.disabled (boolean, default false)boolean
isDfsStrictView()
Property jcifs.smb.client.dfs.strictView (boolean, default false)boolean
isDisablePlainTextPasswords()
Property jcifs.smb.client.disablePlainTextPasswords (boolean, default true)boolean
isDisableSpnegoIntegrity()
Property jcifs.smb.client.disableSpnegoIntegrity (boolean, false)boolean
isEncryptionEnabled()
Property jcifs.smb.client.encryptionEnabled (boolean, default false) This is an experimental option allowing to indicate support during protocol negotiation, SMB encryption is not implemented yet.boolean
isEnforceSpnegoIntegrity()
Property jcifs.smb.client.enforceSpnegoIntegrity (boolean, false)boolean
isForceExtendedSecurity()
Property jcifs.smb.client.forceExtendedSecurity (boolean, default false)boolean
isForceUnicode()
Property jcifs.smb.client.forceUnicode (boolean, default false)boolean
isIgnoreCopyToException()
Property jcifs.smb.client.ignoreCopyToException (boolean, false)boolean
isIpcSigningEnforced()
Property jcifs.smb.client.ipcSigningEnforced (boolean, default true)boolean
isPort139FailoverEnabled()
Enable port 139 failover Property jcifs.smb.client.port139.enabled (boolean, default false)boolean
isRequireSecureNegotiate()
Enforce secure negotiation Property jcifs.smb.client.requireSecureNegotiate (boolean, default true) This does not provide any actual downgrade protection if SMB1 is allowed.boolean
isSendNTLMTargetName()
Property jcifs.smb.client.SendNTLMTargetName (boolean, true)boolean
isSigningEnabled()
Property jcifs.smb.client.signingPreferred (boolean, default false)boolean
isSigningEnforced()
Property jcifs.smb.client.signingEnforced (boolean, default false)boolean
isStrictResourceLifecycle()
Property jcifs.smb.client.strictResourceLifecycle (bool, default false) If enabled, SmbFile instances starting with their first use will hold a reference to their tree.boolean
isTraceResourceUsage()
This is solely intended for debuggingboolean
isUseBatching()
Property jcifs.smb.client.useBatching (boolean, default false)boolean
isUseRawNTLM()
Property jcifs.smb.useRawNTLM (boolean, default false)boolean
isUseSMB2OnlyNegotiation()
Use SMB2 non-backward compatible negotiation style Property jcifs.smb.client.useSMB2Negotiation (boolean, default false)boolean
isUseUnicode()
Property jcifs.smb.client.useUnicode (boolean, default true)
-
-
-
Constructor Detail
-
DelegatingConfiguration
public DelegatingConfiguration(Configuration delegate)
- Parameters:
delegate
- delegate to pass all non-overridden method calls to
-
-
Method Detail
-
getRandom
public SecureRandom getRandom()
- Specified by:
getRandom
in interfaceConfiguration
- Returns:
- random source to use
- See Also:
Configuration.getRandom()
-
getMinimumVersion
public DialectVersion getMinimumVersion()
Minimum protocol version Property jcifs.smb.client.minVersion (string, default SMB1)- Specified by:
getMinimumVersion
in interfaceConfiguration
- Returns:
- minimum protocol version to use/allow
- See Also:
Configuration.getMinimumVersion()
-
getMaximumVersion
public DialectVersion getMaximumVersion()
Maximum protocol version Property jcifs.smb.client.maxVersion (string, default SMB210)- Specified by:
getMaximumVersion
in interfaceConfiguration
- Returns:
- maximum protocol version to use/allow
- See Also:
Configuration.getMaximumVersion()
-
isUseSMB2OnlyNegotiation
public boolean isUseSMB2OnlyNegotiation()
Use SMB2 non-backward compatible negotiation style Property jcifs.smb.client.useSMB2Negotiation (boolean, default false)- Specified by:
isUseSMB2OnlyNegotiation
in interfaceConfiguration
- Returns:
- whether to use non-backward compatible protocol negotiation
- See Also:
Configuration.isUseSMB2OnlyNegotiation()
-
isRequireSecureNegotiate
public boolean isRequireSecureNegotiate()
Enforce secure negotiation Property jcifs.smb.client.requireSecureNegotiate (boolean, default true) This does not provide any actual downgrade protection if SMB1 is allowed. It will also break connections with SMB2 servers that do not properly sign error responses.- Specified by:
isRequireSecureNegotiate
in interfaceConfiguration
- Returns:
- whether to enforce the use of secure negotiation.
- See Also:
Configuration.isRequireSecureNegotiate()
-
isSendNTLMTargetName
public boolean isSendNTLMTargetName()
Property jcifs.smb.client.SendNTLMTargetName (boolean, true)- Specified by:
isSendNTLMTargetName
in interfaceConfiguration
- Returns:
- whether to send an AvTargetName with the NTLM exchange
- See Also:
Configuration.isSendNTLMTargetName()
-
isPort139FailoverEnabled
public boolean isPort139FailoverEnabled()
Enable port 139 failover Property jcifs.smb.client.port139.enabled (boolean, default false)- Specified by:
isPort139FailoverEnabled
in interfaceConfiguration
- Returns:
- whether to failover to legacy transport on port 139
- See Also:
Configuration.isPort139FailoverEnabled()
-
getDfsTtl
public long getDfsTtl()
Property jcifs.smb.client.dfs.ttl (int, default 300)- Specified by:
getDfsTtl
in interfaceConfiguration
- Returns:
- title to live, in seconds, for DFS cache entries
- See Also:
Configuration.getDfsTtl()
-
isDfsStrictView
public boolean isDfsStrictView()
Property jcifs.smb.client.dfs.strictView (boolean, default false)- Specified by:
isDfsStrictView
in interfaceConfiguration
- Returns:
- whether a authentication failure during DFS resolving will throw an exception
- See Also:
Configuration.isDfsStrictView()
-
isDfsDisabled
public boolean isDfsDisabled()
Property jcifs.smb.client.dfs.disabled (boolean, default false)- Specified by:
isDfsDisabled
in interfaceConfiguration
- Returns:
- whether DFS lookup is disabled
- See Also:
Configuration.isDfsDisabled()
-
isDfsConvertToFQDN
public boolean isDfsConvertToFQDN()
Enable hack to make kerberos auth work with DFS sending short names This works by appending the domain name to the netbios short name and will fail horribly if this mapping is not correct for your domain. Property jcifs.smb.client.dfs.convertToFQDN (boolean, default false)- Specified by:
isDfsConvertToFQDN
in interfaceConfiguration
- Returns:
- whether to convert NetBIOS names returned by DFS to FQDNs
- See Also:
Configuration.isDfsConvertToFQDN()
-
isForceUnicode
public boolean isForceUnicode()
Property jcifs.smb.client.forceUnicode (boolean, default false)- Specified by:
isForceUnicode
in interfaceConfiguration
- Returns:
- whether to use unicode, even if the server does not announce it
- See Also:
Configuration.isForceUnicode()
-
isUseUnicode
public boolean isUseUnicode()
Property jcifs.smb.client.useUnicode (boolean, default true)- Specified by:
isUseUnicode
in interfaceConfiguration
- Returns:
- whether to announce support for unicode
- See Also:
Configuration.isUseUnicode()
-
isUseBatching
public boolean isUseBatching()
Property jcifs.smb.client.useBatching (boolean, default false)- Specified by:
isUseBatching
in interfaceConfiguration
- Returns:
- whether to enable support for SMB1 AndX command batching
- See Also:
Configuration.isUseBatching()
-
getNativeOs
public String getNativeOs()
Property jcifs.smb.client.nativeOs (string, default os.name)- Specified by:
getNativeOs
in interfaceConfiguration
- Returns:
- OS string to report
- See Also:
Configuration.getNativeOs()
-
getNativeLanman
public String getNativeLanman()
Property jcifs.smb.client.nativeLanMan (string, default jCIFS)- Specified by:
getNativeLanman
in interfaceConfiguration
- Returns:
- Lanman string to report
- See Also:
Configuration.getNativeLanman()
-
getMaximumBufferSize
public int getMaximumBufferSize()
- Specified by:
getMaximumBufferSize
in interfaceConfiguration
- Returns:
- the maximum size of IO buffers, limits the maximum message size
- See Also:
Configuration.getMaximumBufferSize()
-
getRecieveBufferSize
@Deprecated public int getRecieveBufferSize()
Deprecated.use getReceiveBufferSize insteadProperty jcifs.smb.client.rcv_buf_size (int, default 65535)- Specified by:
getRecieveBufferSize
in interfaceConfiguration
- Returns:
- receive buffer size, in bytes
-
getReceiveBufferSize
public int getReceiveBufferSize()
Property jcifs.smb.client.rcv_buf_size (int, default 65535)- Specified by:
getReceiveBufferSize
in interfaceConfiguration
- Returns:
- receive buffer size, in bytes
- See Also:
Configuration.getReceiveBufferSize()
-
getSendBufferSize
public int getSendBufferSize()
Property jcifs.smb.client.snd_buf_size (int, default 65535)- Specified by:
getSendBufferSize
in interfaceConfiguration
- Returns:
- send buffer size, in bytes
- See Also:
Configuration.getSendBufferSize()
-
getNotifyBufferSize
public int getNotifyBufferSize()
Property jcifs.smb.client.notify_buf_size (int, default 1024)- Specified by:
getNotifyBufferSize
in interfaceConfiguration
- Returns:
- the size of the requested server notify buffer
- See Also:
Configuration.getNotifyBufferSize()
-
getSoTimeout
public int getSoTimeout()
Property jcifs.smb.client.soTimeout (int, default 35000)- Specified by:
getSoTimeout
in interfaceConfiguration
- Returns:
- socket timeout, in milliseconds
- See Also:
Configuration.getSoTimeout()
-
getResponseTimeout
public int getResponseTimeout()
Property jcifs.smb.client.responseTimeout (int, default 30000)- Specified by:
getResponseTimeout
in interfaceConfiguration
- Returns:
- timeout for SMB responses, in milliseconds
- See Also:
Configuration.getResponseTimeout()
-
getConnTimeout
public int getConnTimeout()
Property jcifs.smb.client.connTimeout (int, default 35000)- Specified by:
getConnTimeout
in interfaceConfiguration
- Returns:
- timeout for establishing a socket connection, in milliseconds
- See Also:
Configuration.getConnTimeout()
-
getSessionTimeout
public int getSessionTimeout()
Property jcifs.smb.client.sessionTimeout (int, default 35000)- Specified by:
getSessionTimeout
in interfaceConfiguration
- Returns:
- timeout for SMB sessions, in milliseconds
- See Also:
Configuration.getSessionTimeout()
-
getLocalPort
public int getLocalPort()
Property jcifs.smb.client.lport (int)- Specified by:
getLocalPort
in interfaceConfiguration
- Returns:
- local port to use for outgoing connections
- See Also:
Configuration.getLocalPort()
-
getLocalAddr
public InetAddress getLocalAddr()
Property jcifs.smb.client.laddr (string)- Specified by:
getLocalAddr
in interfaceConfiguration
- Returns:
- local address to use for outgoing connections
- See Also:
Configuration.getLocalAddr()
-
getNetbiosHostname
public String getNetbiosHostname()
Property jcifs.netbios.hostname (string)- Specified by:
getNetbiosHostname
in interfaceConfiguration
- Returns:
- local NETBIOS/short name to announce
- See Also:
Configuration.getNetbiosHostname()
-
getLogonShare
public String getLogonShare()
Property jcifs.smb.client.logonShare- Specified by:
getLogonShare
in interfaceConfiguration
- Returns:
- share to connect to during authentication, if unset connect to IPC$
- See Also:
Configuration.getLogonShare()
-
getDefaultDomain
public String getDefaultDomain()
Property jcifs.smb.client.domain- Specified by:
getDefaultDomain
in interfaceConfiguration
- Returns:
- default credentials, domain name
- See Also:
Configuration.getDefaultDomain()
-
getDefaultUsername
public String getDefaultUsername()
Property jcifs.smb.client.username- Specified by:
getDefaultUsername
in interfaceConfiguration
- Returns:
- default credentials, user name
- See Also:
Configuration.getDefaultUsername()
-
getDefaultPassword
public String getDefaultPassword()
Property jcifs.smb.client.password- Specified by:
getDefaultPassword
in interfaceConfiguration
- Returns:
- default credentials, password
- See Also:
Configuration.getDefaultPassword()
-
isDisablePlainTextPasswords
public boolean isDisablePlainTextPasswords()
Description copied from interface:Configuration
Property jcifs.smb.client.disablePlainTextPasswords (boolean, default true)- Specified by:
isDisablePlainTextPasswords
in interfaceConfiguration
- Returns:
- whether the usage of plaintext passwords is prohibited, defaults to false
- See Also:
Configuration.isDisablePlainTextPasswords()
-
isForceExtendedSecurity
public boolean isForceExtendedSecurity()
Property jcifs.smb.client.forceExtendedSecurity (boolean, default false)- Specified by:
isForceExtendedSecurity
in interfaceConfiguration
- Returns:
- whether to force extended security usage
- See Also:
Configuration.isForceExtendedSecurity()
-
getLanManCompatibility
public int getLanManCompatibility()
Lanman compatibility level0 or 1 LM and NTLM 2 NTLM only 3-5 NTLMv2 only - Specified by:
getLanManCompatibility
in interfaceConfiguration
- Returns:
- lanman compatibility level, defaults to 3 i.e. NTLMv2 only
- See Also:
Configuration.getLanManCompatibility()
-
isAllowNTLMFallback
public boolean isAllowNTLMFallback()
Property jcifs.smb.allowNTLMFallback (boolean, default true)- Specified by:
isAllowNTLMFallback
in interfaceConfiguration
- Returns:
- whether to allow fallback from kerberos to NTLM
- See Also:
Configuration.isAllowNTLMFallback()
-
isUseRawNTLM
public boolean isUseRawNTLM()
Property jcifs.smb.useRawNTLM (boolean, default false)- Specified by:
isUseRawNTLM
in interfaceConfiguration
- Returns:
- whether to use raw NTLMSSP tokens instead of SPNEGO wrapped ones
- See Also:
Configuration.isUseRawNTLM()
-
isDisableSpnegoIntegrity
public boolean isDisableSpnegoIntegrity()
Property jcifs.smb.client.disableSpnegoIntegrity (boolean, false)- Specified by:
isDisableSpnegoIntegrity
in interfaceConfiguration
- Returns:
- whether to disable sending/verifying SPNEGO mechanismListMIC
- See Also:
Configuration.isDisableSpnegoIntegrity()
-
isEnforceSpnegoIntegrity
public boolean isEnforceSpnegoIntegrity()
Property jcifs.smb.client.enforceSpnegoIntegrity (boolean, false)- Specified by:
isEnforceSpnegoIntegrity
in interfaceConfiguration
- Returns:
- whether to enforce verifying SPNEGO mechanismListMIC
- See Also:
Configuration.isEnforceSpnegoIntegrity()
-
getResolveOrder
public List<ResolverType> getResolveOrder()
Property jcifs.resolveOrder (string, default LMHOSTS,DNS,WINS,BCAST)- Specified by:
getResolveOrder
in interfaceConfiguration
- Returns:
- order and selection of resolver modules, see
ResolverType
- See Also:
Configuration.getResolveOrder()
-
getBroadcastAddress
public InetAddress getBroadcastAddress()
Property jcifs.netbios.baddr (string, default 255.255.255.255)- Specified by:
getBroadcastAddress
in interfaceConfiguration
- Returns:
- broadcast address to use
- See Also:
Configuration.getBroadcastAddress()
-
getWinsServers
public InetAddress[] getWinsServers()
Property jcifs.netbios.wins (string, comma separated)- Specified by:
getWinsServers
in interfaceConfiguration
- Returns:
- WINS server to use
- See Also:
Configuration.getWinsServers()
-
getNetbiosLocalPort
public int getNetbiosLocalPort()
Property jcifs.netbios.lport (int)- Specified by:
getNetbiosLocalPort
in interfaceConfiguration
- Returns:
- local bind port for nebios connections
- See Also:
Configuration.getNetbiosLocalPort()
-
getNetbiosLocalAddress
public InetAddress getNetbiosLocalAddress()
Property jcifs.netbios.laddr (string)- Specified by:
getNetbiosLocalAddress
in interfaceConfiguration
- Returns:
- local bind address for netbios connections
- See Also:
Configuration.getNetbiosLocalAddress()
-
getVcNumber
public int getVcNumber()
- Specified by:
getVcNumber
in interfaceConfiguration
- Returns:
- virtual circuit number to use
- See Also:
Configuration.getVcNumber()
-
getCapabilities
public int getCapabilities()
Property jcifs.smb.client.capabilities (int)- Specified by:
getCapabilities
in interfaceConfiguration
- Returns:
- custom capabilities
- See Also:
Configuration.getCapabilities()
-
getFlags2
public int getFlags2()
Property jcifs.smb.client.flags2 (int)- Specified by:
getFlags2
in interfaceConfiguration
- Returns:
- custom flags2
- See Also:
Configuration.getFlags2()
-
getSessionLimit
public int getSessionLimit()
Property jcifs.smb.client.ssnLimit (int, 250)- Specified by:
getSessionLimit
in interfaceConfiguration
- Returns:
- maximum number of sessions on a single connection
- See Also:
Configuration.getSessionLimit()
-
getOemEncoding
public String getOemEncoding()
Property jcifs.encoding (string, default Cp850)- Specified by:
getOemEncoding
in interfaceConfiguration
- Returns:
- OEM encoding to use
- See Also:
Configuration.getOemEncoding()
-
getLocalTimezone
public TimeZone getLocalTimezone()
- Specified by:
getLocalTimezone
in interfaceConfiguration
- Returns:
- local timezone
- See Also:
Configuration.getLocalTimezone()
-
getPid
public int getPid()
- Specified by:
getPid
in interfaceConfiguration
- Returns:
- Process id to send, randomized if unset
- See Also:
Configuration.getPid()
-
getMaxMpxCount
public int getMaxMpxCount()
Property jcifs.smb.client.maxMpxCount (int, default 10)- Specified by:
getMaxMpxCount
in interfaceConfiguration
- Returns:
- maximum count of concurrent commands to announce
- See Also:
Configuration.getMaxMpxCount()
-
isSigningEnabled
public boolean isSigningEnabled()
Property jcifs.smb.client.signingPreferred (boolean, default false)- Specified by:
isSigningEnabled
in interfaceConfiguration
- Returns:
- whether to enable SMB signing (for everything), if available
- See Also:
Configuration.isSigningEnabled()
-
isSigningEnforced
public boolean isSigningEnforced()
Property jcifs.smb.client.signingEnforced (boolean, default false)- Specified by:
isSigningEnforced
in interfaceConfiguration
- Returns:
- whether to enforce SMB signing (for everything)
- See Also:
Configuration.isSigningEnforced()
-
isIpcSigningEnforced
public boolean isIpcSigningEnforced()
Property jcifs.smb.client.ipcSigningEnforced (boolean, default true)- Specified by:
isIpcSigningEnforced
in interfaceConfiguration
- Returns:
- whether to enforce SMB signing for IPC connections
- See Also:
Configuration.isIpcSigningEnforced()
-
isEncryptionEnabled
public boolean isEncryptionEnabled()
Property jcifs.smb.client.encryptionEnabled (boolean, default false) This is an experimental option allowing to indicate support during protocol negotiation, SMB encryption is not implemented yet.- Specified by:
isEncryptionEnabled
in interfaceConfiguration
- Returns:
- whether SMB encryption is enabled
- See Also:
Configuration.isEncryptionEnabled()
-
getLmHostsFileName
public String getLmHostsFileName()
Property jcifs.netbios.lmhosts (string)- Specified by:
getLmHostsFileName
in interfaceConfiguration
- Returns:
- lmhosts file to use
- See Also:
Configuration.getLmHostsFileName()
-
getNetbiosScope
public String getNetbiosScope()
Property jcifs.netbios.scope (string)- Specified by:
getNetbiosScope
in interfaceConfiguration
- Returns:
- default netbios scope to set in requests
- See Also:
Configuration.getNetbiosScope()
-
getNetbiosSoTimeout
public int getNetbiosSoTimeout()
Property jcifs.netbios.soTimeout (int, default 5000)- Specified by:
getNetbiosSoTimeout
in interfaceConfiguration
- Returns:
- socket timeout for netbios connections, in milliseconds
- See Also:
Configuration.getNetbiosSoTimeout()
-
getNetbiosSndBufSize
public int getNetbiosSndBufSize()
Property jcifs.netbios.snd_buf_size (int, default 576)- Specified by:
getNetbiosSndBufSize
in interfaceConfiguration
- Returns:
- netbios send buffer size
- See Also:
Configuration.getNetbiosSndBufSize()
-
getNetbiosRetryTimeout
public int getNetbiosRetryTimeout()
Property jcifs.netbios.retryTimeout (int, default 3000)- Specified by:
getNetbiosRetryTimeout
in interfaceConfiguration
- Returns:
- timeout of retry requests, in milliseconds
- See Also:
Configuration.getNetbiosRetryTimeout()
-
getNetbiosRetryCount
public int getNetbiosRetryCount()
Property jcifs.netbios.retryCount (int, default 2)- Specified by:
getNetbiosRetryCount
in interfaceConfiguration
- Returns:
- maximum number of retries for netbios requests
- See Also:
Configuration.getNetbiosRetryCount()
-
getNetbiosRcvBufSize
public int getNetbiosRcvBufSize()
Property jcifs.netbios.rcv_buf_size (int, default 576)- Specified by:
getNetbiosRcvBufSize
in interfaceConfiguration
- Returns:
- netbios recieve buffer size
- See Also:
Configuration.getNetbiosRcvBufSize()
-
getNetbiosCachePolicy
public int getNetbiosCachePolicy()
Property jcifs.netbios.cachePolicy in minutes (int, default 600)- Specified by:
getNetbiosCachePolicy
in interfaceConfiguration
- Returns:
- netbios cache timeout, in seconds, 0 - disable caching, -1 - cache forever
- See Also:
Configuration.getNetbiosCachePolicy()
-
getTransactionBufferSize
public int getTransactionBufferSize()
Property jcifs.smb.client.transaction_buf_size (int, default 65535)- Specified by:
getTransactionBufferSize
in interfaceConfiguration
- Returns:
- maximum data size for SMB transactions
- See Also:
Configuration.getTransactionBufferSize()
-
getBufferCacheSize
public int getBufferCacheSize()
Property jcifs.smb.maxBuffers (int, default 16)- Specified by:
getBufferCacheSize
in interfaceConfiguration
- Returns:
- number of buffers to keep in cache
- See Also:
Configuration.getBufferCacheSize()
-
getListCount
public int getListCount()
Property jcifs.smb.client.listCount (int, default 200)- Specified by:
getListCount
in interfaceConfiguration
- Returns:
- maxmimum number of elements to request in a list request
- See Also:
Configuration.getListCount()
-
getListSize
public int getListSize()
Property jcifs.smb.client.listSize (int, default 65435)- Specified by:
getListSize
in interfaceConfiguration
- Returns:
- maximum data size for list/info requests (known overhead is subtracted)
- See Also:
Configuration.getListSize()
-
getAttributeCacheTimeout
public long getAttributeCacheTimeout()
Property jcifs.smb.client.attrExpirationPeriod (int, 5000)- Specified by:
getAttributeCacheTimeout
in interfaceConfiguration
- Returns:
- timeout of file attribute cache
- See Also:
Configuration.getAttributeCacheTimeout()
-
isIgnoreCopyToException
public boolean isIgnoreCopyToException()
Property jcifs.smb.client.ignoreCopyToException (boolean, false)- Specified by:
isIgnoreCopyToException
in interfaceConfiguration
- Returns:
- whether to ignore exceptions that occur during file copy
- See Also:
Configuration.isIgnoreCopyToException()
-
getBatchLimit
public int getBatchLimit(String cmd)
- Specified by:
getBatchLimit
in interfaceConfiguration
- Returns:
- the batch limit for the given command
- See Also:
Configuration.getBatchLimit(java.lang.String)
-
isAllowCompound
public boolean isAllowCompound(String command)
- Specified by:
isAllowCompound
in interfaceConfiguration
- Returns:
- whether to allow creating compound requests with that command
- See Also:
Configuration.isAllowCompound(java.lang.String)
-
isTraceResourceUsage
public boolean isTraceResourceUsage()
This is solely intended for debugging- Specified by:
isTraceResourceUsage
in interfaceConfiguration
- Returns:
- whether to track the locations from which resources were created
- See Also:
Configuration.isTraceResourceUsage()
-
isStrictResourceLifecycle
public boolean isStrictResourceLifecycle()
Property jcifs.smb.client.strictResourceLifecycle (bool, default false) If enabled, SmbFile instances starting with their first use will hold a reference to their tree. This means that trees/sessions/connections won't be idle-disconnected even if there are no other active references (currently executing code, file descriptors). Depending on the usage scenario, this may have some benefit as there won't be any delays for restablishing these resources, however comes at the cost of having to properly release all SmbFile instances you no longer need.- Specified by:
isStrictResourceLifecycle
in interfaceConfiguration
- Returns:
- whether to use strict resource lifecycle
- See Also:
Configuration.isStrictResourceLifecycle()
-
getMaxRequestRetries
public int getMaxRequestRetries()
Property jcifs.smb.client.maxRequestRetries (int, default 2)- Specified by:
getMaxRequestRetries
in interfaceConfiguration
- Returns:
- retry SMB requests on failure up to n times
- See Also:
Configuration.getMaxRequestRetries()
-
getMachineId
public byte[] getMachineId()
Machine identifier ClientGuid, ... are derived from this value. Normally this should be randomly assigned for each client instance/configuration.- Specified by:
getMachineId
in interfaceConfiguration
- Returns:
- machine identifier (32 byte)
- See Also:
Configuration.getMachineId()
-
getGuestUsername
public String getGuestUsername()
Property jcifs.smb.client.guestUsername, defaults to GUEST- Specified by:
getGuestUsername
in interfaceConfiguration
- Returns:
- username used when guest authentication is requested
- See Also:
Configuration.getGuestUsername()
-
getGuestPassword
public String getGuestPassword()
Property jcifs.smb.client.guestPassword, defaults to empty string- Specified by:
getGuestPassword
in interfaceConfiguration
- Returns:
- password used when guest authentication is requested
- See Also:
Configuration.getGuestPassword()
-
isAllowGuestFallback
public boolean isAllowGuestFallback()
Property jcifs.smb.client.allowGuestFallback, defaults to false- Specified by:
isAllowGuestFallback
in interfaceConfiguration
- Returns:
- whether to permit guest logins when user authentication is requested
- See Also:
Configuration.isAllowGuestFallback()
-
-