Package jcifs
Interface Configuration
-
- All Known Implementing Classes:
BaseConfiguration,DelegatingConfiguration,PropertyConfiguration
public interface ConfigurationImplementors of this interface should extendBaseConfigurationorDelegatingConfigurationto get forward compatibility.- Author:
- mbechler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description longgetAttributeCacheTimeout()Property jcifs.smb.client.attrExpirationPeriod (int, 5000)intgetBatchLimit(String cmd)InetAddressgetBroadcastAddress()Property jcifs.netbios.baddr (string, default 255.255.255.255)intgetBufferCacheSize()Property jcifs.smb.maxBuffers (int, default 16)intgetCapabilities()Property jcifs.smb.client.capabilities (int)intgetConnTimeout()Property jcifs.smb.client.connTimeout (int, default 35000)StringgetDefaultDomain()Property jcifs.smb.client.domainStringgetDefaultPassword()Property jcifs.smb.client.passwordStringgetDefaultUsername()Property jcifs.smb.client.usernamelonggetDfsTtl()Property jcifs.smb.client.dfs.ttl (int, default 300)intgetFlags2()Property jcifs.smb.client.flags2 (int)StringgetGuestPassword()Property jcifs.smb.client.guestPassword, defaults to empty stringStringgetGuestUsername()Property jcifs.smb.client.guestUsername, defaults to GUESTintgetLanManCompatibility()Lanman compatibility level 0 or 1 LM and NTLM 2 NTLM only 3-5 NTLMv2 only Property jcifs.smb.lmCompatibility (int, default 3)intgetListCount()Property jcifs.smb.client.listCount (int, default 200)intgetListSize()Property jcifs.smb.client.listSize (int, default 65435)StringgetLmHostsFileName()Property jcifs.netbios.lmhosts (string)InetAddressgetLocalAddr()Property jcifs.smb.client.laddr (string)intgetLocalPort()Property jcifs.smb.client.lport (int)TimeZonegetLocalTimezone()StringgetLogonShare()Property jcifs.smb.client.logonSharebyte[]getMachineId()Machine identifier ClientGuid, ...intgetMaximumBufferSize()DialectVersiongetMaximumVersion()Maximum protocol version Property jcifs.smb.client.maxVersion (string, default SMB210)intgetMaxMpxCount()Property jcifs.smb.client.maxMpxCount (int, default 10)intgetMaxRequestRetries()Property jcifs.smb.client.maxRequestRetries (int, default 2)DialectVersiongetMinimumVersion()Minimum protocol version Property jcifs.smb.client.minVersion (string, default SMB1)StringgetNativeLanman()Property jcifs.smb.client.nativeLanMan (string, default jCIFS)StringgetNativeOs()Property jcifs.smb.client.nativeOs (string, default os.name)intgetNetbiosCachePolicy()Property jcifs.netbios.cachePolicy in minutes (int, default 600)StringgetNetbiosHostname()Property jcifs.netbios.hostname (string)InetAddressgetNetbiosLocalAddress()Property jcifs.netbios.laddr (string)intgetNetbiosLocalPort()Property jcifs.netbios.lport (int)intgetNetbiosRcvBufSize()Property jcifs.netbios.rcv_buf_size (int, default 576)intgetNetbiosRetryCount()Property jcifs.netbios.retryCount (int, default 2)intgetNetbiosRetryTimeout()Property jcifs.netbios.retryTimeout (int, default 3000)StringgetNetbiosScope()Property jcifs.netbios.scope (string)intgetNetbiosSndBufSize()Property jcifs.netbios.snd_buf_size (int, default 576)intgetNetbiosSoTimeout()Property jcifs.netbios.soTimeout (int, default 5000)intgetNotifyBufferSize()Property jcifs.smb.client.notify_buf_size (int, default 1024)StringgetOemEncoding()Property jcifs.encoding (string, default Cp850)intgetPid()SecureRandomgetRandom()intgetReceiveBufferSize()Property jcifs.smb.client.rcv_buf_size (int, default 65535)intgetRecieveBufferSize()Deprecated.use getReceiveBufferSize insteadList<ResolverType>getResolveOrder()Property jcifs.resolveOrder (string, default LMHOSTS,DNS,WINS,BCAST)intgetResponseTimeout()Property jcifs.smb.client.responseTimeout (int, default 30000)intgetSendBufferSize()Property jcifs.smb.client.snd_buf_size (int, default 65535)intgetSessionLimit()Property jcifs.smb.client.ssnLimit (int, 250)intgetSessionTimeout()Property jcifs.smb.client.sessionTimeout (int, default 35000)intgetSoTimeout()Property jcifs.smb.client.soTimeout (int, default 35000)intgetTransactionBufferSize()Property jcifs.smb.client.transaction_buf_size (int, default 65535)intgetVcNumber()InetAddress[]getWinsServers()Property jcifs.netbios.wins (string, comma separated)booleanisAllowCompound(String command)booleanisAllowGuestFallback()Property jcifs.smb.client.allowGuestFallback, defaults to falsebooleanisAllowNTLMFallback()Property jcifs.smb.allowNTLMFallback (boolean, default true)booleanisDfsConvertToFQDN()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.booleanisDfsDisabled()Property jcifs.smb.client.dfs.disabled (boolean, default false)booleanisDfsStrictView()Property jcifs.smb.client.dfs.strictView (boolean, default false)booleanisDisablePlainTextPasswords()Property jcifs.smb.client.disablePlainTextPasswords (boolean, default true)booleanisDisableSpnegoIntegrity()Property jcifs.smb.client.disableSpnegoIntegrity (boolean, false)booleanisEncryptionEnabled()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.booleanisEnforceSpnegoIntegrity()Property jcifs.smb.client.enforceSpnegoIntegrity (boolean, false)booleanisForceExtendedSecurity()Property jcifs.smb.client.forceExtendedSecurity (boolean, default false)booleanisForceUnicode()Property jcifs.smb.client.forceUnicode (boolean, default false)booleanisIgnoreCopyToException()Property jcifs.smb.client.ignoreCopyToException (boolean, false)booleanisIpcSigningEnforced()Property jcifs.smb.client.ipcSigningEnforced (boolean, default true)booleanisPort139FailoverEnabled()Enable port 139 failover Property jcifs.smb.client.port139.enabled (boolean, default false)booleanisRequireSecureNegotiate()Enforce secure negotiation Property jcifs.smb.client.requireSecureNegotiate (boolean, default true) This does not provide any actual downgrade protection if SMB1 is allowed.booleanisSendNTLMTargetName()Property jcifs.smb.client.SendNTLMTargetName (boolean, true)booleanisSigningEnabled()Property jcifs.smb.client.signingPreferred (boolean, default false)booleanisSigningEnforced()Property jcifs.smb.client.signingEnforced (boolean, default false)booleanisStrictResourceLifecycle()Property jcifs.smb.client.strictResourceLifecycle (bool, default false) If enabled, SmbFile instances starting with their first use will hold a reference to their tree.booleanisTraceResourceUsage()This is solely intended for debuggingbooleanisUseBatching()Property jcifs.smb.client.useBatching (boolean, default false)booleanisUseRawNTLM()Property jcifs.smb.useRawNTLM (boolean, default false)booleanisUseSMB2OnlyNegotiation()Use SMB2 non-backward compatible negotiation style Property jcifs.smb.client.useSMB2Negotiation (boolean, default false)booleanisUseUnicode()Property jcifs.smb.client.useUnicode (boolean, default true)
-
-
-
Method Detail
-
getRandom
SecureRandom getRandom()
- Returns:
- random source to use
-
getDfsTtl
long getDfsTtl()
Property jcifs.smb.client.dfs.ttl (int, default 300)- Returns:
- title to live, in seconds, for DFS cache entries
-
isDfsStrictView
boolean isDfsStrictView()
Property jcifs.smb.client.dfs.strictView (boolean, default false)- Returns:
- whether a authentication failure during DFS resolving will throw an exception
-
isDfsDisabled
boolean isDfsDisabled()
Property jcifs.smb.client.dfs.disabled (boolean, default false)- Returns:
- whether DFS lookup is disabled
-
isDfsConvertToFQDN
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)- Returns:
- whether to convert NetBIOS names returned by DFS to FQDNs
-
getMinimumVersion
DialectVersion getMinimumVersion()
Minimum protocol version Property jcifs.smb.client.minVersion (string, default SMB1)- Returns:
- minimum protocol version to use/allow
- Since:
- 2.1
- See Also:
DialectVersion
-
getMaximumVersion
DialectVersion getMaximumVersion()
Maximum protocol version Property jcifs.smb.client.maxVersion (string, default SMB210)- Returns:
- maximum protocol version to use/allow
- Since:
- 2.1
- See Also:
DialectVersion
-
isUseSMB2OnlyNegotiation
boolean isUseSMB2OnlyNegotiation()
Use SMB2 non-backward compatible negotiation style Property jcifs.smb.client.useSMB2Negotiation (boolean, default false)- Returns:
- whether to use non-backward compatible protocol negotiation
-
isRequireSecureNegotiate
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.- Returns:
- whether to enforce the use of secure negotiation.
-
isPort139FailoverEnabled
boolean isPort139FailoverEnabled()
Enable port 139 failover Property jcifs.smb.client.port139.enabled (boolean, default false)- Returns:
- whether to failover to legacy transport on port 139
-
isUseUnicode
boolean isUseUnicode()
Property jcifs.smb.client.useUnicode (boolean, default true)- Returns:
- whether to announce support for unicode
-
isForceUnicode
boolean isForceUnicode()
Property jcifs.smb.client.forceUnicode (boolean, default false)- Returns:
- whether to use unicode, even if the server does not announce it
-
isUseBatching
boolean isUseBatching()
Property jcifs.smb.client.useBatching (boolean, default false)- Returns:
- whether to enable support for SMB1 AndX command batching
-
getNativeOs
String getNativeOs()
Property jcifs.smb.client.nativeOs (string, default os.name)- Returns:
- OS string to report
-
getNativeLanman
String getNativeLanman()
Property jcifs.smb.client.nativeLanMan (string, default jCIFS)- Returns:
- Lanman string to report
-
getRecieveBufferSize
@Deprecated int getRecieveBufferSize()
Deprecated.use getReceiveBufferSize insteadProperty jcifs.smb.client.rcv_buf_size (int, default 65535)- Returns:
- receive buffer size, in bytes
-
getReceiveBufferSize
int getReceiveBufferSize()
Property jcifs.smb.client.rcv_buf_size (int, default 65535)- Returns:
- receive buffer size, in bytes
-
getSendBufferSize
int getSendBufferSize()
Property jcifs.smb.client.snd_buf_size (int, default 65535)- Returns:
- send buffer size, in bytes
-
getSoTimeout
int getSoTimeout()
Property jcifs.smb.client.soTimeout (int, default 35000)- Returns:
- socket timeout, in milliseconds
-
getConnTimeout
int getConnTimeout()
Property jcifs.smb.client.connTimeout (int, default 35000)- Returns:
- timeout for establishing a socket connection, in milliseconds
-
getSessionTimeout
int getSessionTimeout()
Property jcifs.smb.client.sessionTimeout (int, default 35000)- Returns:
- timeout for SMB sessions, in milliseconds
-
getResponseTimeout
int getResponseTimeout()
Property jcifs.smb.client.responseTimeout (int, default 30000)- Returns:
- timeout for SMB responses, in milliseconds
-
getLocalPort
int getLocalPort()
Property jcifs.smb.client.lport (int)- Returns:
- local port to use for outgoing connections
-
getLocalAddr
InetAddress getLocalAddr()
Property jcifs.smb.client.laddr (string)- Returns:
- local address to use for outgoing connections
-
getNetbiosHostname
String getNetbiosHostname()
Property jcifs.netbios.hostname (string)- Returns:
- local NETBIOS/short name to announce
-
getLogonShare
String getLogonShare()
Property jcifs.smb.client.logonShare- Returns:
- share to connect to during authentication, if unset connect to IPC$
-
getDefaultDomain
String getDefaultDomain()
Property jcifs.smb.client.domain- Returns:
- default credentials, domain name
-
getDefaultUsername
String getDefaultUsername()
Property jcifs.smb.client.username- Returns:
- default credentials, user name
-
getDefaultPassword
String getDefaultPassword()
Property jcifs.smb.client.password- Returns:
- default credentials, password
-
getLanManCompatibility
int getLanManCompatibility()
Lanman compatibility level
Property jcifs.smb.lmCompatibility (int, default 3)0 or 1 LM and NTLM 2 NTLM only 3-5 NTLMv2 only - Returns:
- lanman compatibility level, defaults to 3 i.e. NTLMv2 only
-
isAllowNTLMFallback
boolean isAllowNTLMFallback()
Property jcifs.smb.allowNTLMFallback (boolean, default true)- Returns:
- whether to allow fallback from kerberos to NTLM
-
isUseRawNTLM
boolean isUseRawNTLM()
Property jcifs.smb.useRawNTLM (boolean, default false)- Returns:
- whether to use raw NTLMSSP tokens instead of SPNEGO wrapped ones
- Since:
- 2.1
-
isDisablePlainTextPasswords
boolean isDisablePlainTextPasswords()
Property jcifs.smb.client.disablePlainTextPasswords (boolean, default true)- Returns:
- whether the usage of plaintext passwords is prohibited, defaults to false
-
getResolveOrder
List<ResolverType> getResolveOrder()
Property jcifs.resolveOrder (string, default LMHOSTS,DNS,WINS,BCAST)- Returns:
- order and selection of resolver modules, see
ResolverType
-
getBroadcastAddress
InetAddress getBroadcastAddress()
Property jcifs.netbios.baddr (string, default 255.255.255.255)- Returns:
- broadcast address to use
-
getWinsServers
InetAddress[] getWinsServers()
Property jcifs.netbios.wins (string, comma separated)- Returns:
- WINS server to use
-
getNetbiosLocalPort
int getNetbiosLocalPort()
Property jcifs.netbios.lport (int)- Returns:
- local bind port for nebios connections
-
getNetbiosLocalAddress
InetAddress getNetbiosLocalAddress()
Property jcifs.netbios.laddr (string)- Returns:
- local bind address for netbios connections
-
getNetbiosSoTimeout
int getNetbiosSoTimeout()
Property jcifs.netbios.soTimeout (int, default 5000)- Returns:
- socket timeout for netbios connections, in milliseconds
-
getVcNumber
int getVcNumber()
- Returns:
- virtual circuit number to use
-
getCapabilities
int getCapabilities()
Property jcifs.smb.client.capabilities (int)- Returns:
- custom capabilities
-
getFlags2
int getFlags2()
Property jcifs.smb.client.flags2 (int)- Returns:
- custom flags2
-
getSessionLimit
int getSessionLimit()
Property jcifs.smb.client.ssnLimit (int, 250)- Returns:
- maximum number of sessions on a single connection
-
getOemEncoding
String getOemEncoding()
Property jcifs.encoding (string, default Cp850)- Returns:
- OEM encoding to use
-
getLocalTimezone
TimeZone getLocalTimezone()
- Returns:
- local timezone
-
getPid
int getPid()
- Returns:
- Process id to send, randomized if unset
-
getMaxMpxCount
int getMaxMpxCount()
Property jcifs.smb.client.maxMpxCount (int, default 10)- Returns:
- maximum count of concurrent commands to announce
-
isSigningEnabled
boolean isSigningEnabled()
Property jcifs.smb.client.signingPreferred (boolean, default false)- Returns:
- whether to enable SMB signing (for everything), if available
-
isIpcSigningEnforced
boolean isIpcSigningEnforced()
Property jcifs.smb.client.ipcSigningEnforced (boolean, default true)- Returns:
- whether to enforce SMB signing for IPC connections
-
isSigningEnforced
boolean isSigningEnforced()
Property jcifs.smb.client.signingEnforced (boolean, default false)- Returns:
- whether to enforce SMB signing (for everything)
-
isEncryptionEnabled
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.- Returns:
- whether SMB encryption is enabled
- Since:
- 2.1
-
isForceExtendedSecurity
boolean isForceExtendedSecurity()
Property jcifs.smb.client.forceExtendedSecurity (boolean, default false)- Returns:
- whether to force extended security usage
-
getLmHostsFileName
String getLmHostsFileName()
Property jcifs.netbios.lmhosts (string)- Returns:
- lmhosts file to use
-
getNetbiosScope
String getNetbiosScope()
Property jcifs.netbios.scope (string)- Returns:
- default netbios scope to set in requests
-
getNetbiosSndBufSize
int getNetbiosSndBufSize()
Property jcifs.netbios.snd_buf_size (int, default 576)- Returns:
- netbios send buffer size
-
getNetbiosRcvBufSize
int getNetbiosRcvBufSize()
Property jcifs.netbios.rcv_buf_size (int, default 576)- Returns:
- netbios recieve buffer size
-
getNetbiosRetryTimeout
int getNetbiosRetryTimeout()
Property jcifs.netbios.retryTimeout (int, default 3000)- Returns:
- timeout of retry requests, in milliseconds
-
getNetbiosRetryCount
int getNetbiosRetryCount()
Property jcifs.netbios.retryCount (int, default 2)- Returns:
- maximum number of retries for netbios requests
-
getNetbiosCachePolicy
int getNetbiosCachePolicy()
Property jcifs.netbios.cachePolicy in minutes (int, default 600)- Returns:
- netbios cache timeout, in seconds, 0 - disable caching, -1 - cache forever
-
getMaximumBufferSize
int getMaximumBufferSize()
- Returns:
- the maximum size of IO buffers, limits the maximum message size
-
getTransactionBufferSize
int getTransactionBufferSize()
Property jcifs.smb.client.transaction_buf_size (int, default 65535)- Returns:
- maximum data size for SMB transactions
-
getBufferCacheSize
int getBufferCacheSize()
Property jcifs.smb.maxBuffers (int, default 16)- Returns:
- number of buffers to keep in cache
-
getListCount
int getListCount()
Property jcifs.smb.client.listCount (int, default 200)- Returns:
- maxmimum number of elements to request in a list request
-
getListSize
int getListSize()
Property jcifs.smb.client.listSize (int, default 65435)- Returns:
- maximum data size for list/info requests (known overhead is subtracted)
-
getAttributeCacheTimeout
long getAttributeCacheTimeout()
Property jcifs.smb.client.attrExpirationPeriod (int, 5000)- Returns:
- timeout of file attribute cache
-
isIgnoreCopyToException
boolean isIgnoreCopyToException()
Property jcifs.smb.client.ignoreCopyToException (boolean, false)- Returns:
- whether to ignore exceptions that occur during file copy
-
getBatchLimit
int getBatchLimit(String cmd)
- Parameters:
cmd-- Returns:
- the batch limit for the given command
-
getNotifyBufferSize
int getNotifyBufferSize()
Property jcifs.smb.client.notify_buf_size (int, default 1024)- Returns:
- the size of the requested server notify buffer
-
getMaxRequestRetries
int getMaxRequestRetries()
Property jcifs.smb.client.maxRequestRetries (int, default 2)- Returns:
- retry SMB requests on failure up to n times
-
isStrictResourceLifecycle
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.- Returns:
- whether to use strict resource lifecycle
-
isTraceResourceUsage
boolean isTraceResourceUsage()
This is solely intended for debugging- Returns:
- whether to track the locations from which resources were created
-
isAllowCompound
boolean isAllowCompound(String command)
- Parameters:
command-- Returns:
- whether to allow creating compound requests with that command
-
getMachineId
byte[] getMachineId()
Machine identifier ClientGuid, ... are derived from this value. Normally this should be randomly assigned for each client instance/configuration.- Returns:
- machine identifier (32 byte)
-
isDisableSpnegoIntegrity
boolean isDisableSpnegoIntegrity()
Property jcifs.smb.client.disableSpnegoIntegrity (boolean, false)- Returns:
- whether to disable sending/verifying SPNEGO mechanismListMIC
-
isEnforceSpnegoIntegrity
boolean isEnforceSpnegoIntegrity()
Property jcifs.smb.client.enforceSpnegoIntegrity (boolean, false)- Returns:
- whether to enforce verifying SPNEGO mechanismListMIC
-
isSendNTLMTargetName
boolean isSendNTLMTargetName()
Property jcifs.smb.client.SendNTLMTargetName (boolean, true)- Returns:
- whether to send an AvTargetName with the NTLM exchange
-
getGuestPassword
String getGuestPassword()
Property jcifs.smb.client.guestPassword, defaults to empty string- Returns:
- password used when guest authentication is requested
-
getGuestUsername
String getGuestUsername()
Property jcifs.smb.client.guestUsername, defaults to GUEST- Returns:
- username used when guest authentication is requested
-
isAllowGuestFallback
boolean isAllowGuestFallback()
Property jcifs.smb.client.allowGuestFallback, defaults to false- Returns:
- whether to permit guest logins when user authentication is requested
-
-