Package com.hierynomus.smbj.connection
Class ConnectionContext
- java.lang.Object
-
- com.hierynomus.smbj.connection.ConnectionContext
-
public class ConnectionContext extends java.lang.Object
-
-
Method Summary
Modifier and Type Method Description boolean
clientPrefersEncryption()
Indicates that the client prefers encryption on this connection.SMB3EncryptionCipher
getCipherId()
java.util.EnumSet<SMB2GlobalCapability>
getClientCapabilities()
java.util.UUID
getClientGuid()
java.util.Set<SMB3CompressionAlgorithm>
getCompressionIds()
byte[]
getGssNegotiateToken()
NegotiatedProtocol
getNegotiatedProtocol()
java.lang.String
getNetBiosName()
SMB3HashAlgorithm
getPreauthIntegrityHashId()
byte[]
getPreauthIntegrityHashValue()
Server
getServer()
java.util.UUID
getServerGuid()
java.lang.String
getServerName()
java.lang.Long
getTimeOffsetMillis()
WindowsVersion
getWindowsVersion()
boolean
isServerRequiresSigning()
boolean
isServerSigningEnabled()
void
setNetBiosName(java.lang.String netBiosName)
void
setServer(Server server)
void
setWindowsVersion(WindowsVersion windowsVersion)
boolean
supportsDFS()
boolean
supportsDirectoryLeasing()
If Connection.Dialect belongs to the SMB 3.x dialect family, the client MUST perform the following: If SMB2_GLOBAL_CAP_DIRECTORY_LEASING is set in the Capabilities field of the SMB2 NEGOTIATE Response, the client MUST set Connection.SupportsDirectoryLeasing to TRUE.boolean
supportsEncryption()
boolean
supportsFileLeasing()
If the client implements SMB 2.1 or SMB 3.x dialect family, the client MUST perform the following: If SMB2_GLOBAL_CAP_LEASING is set in the Capabilities field of the SMB2 NEGOTIATE Response, the client MUST set Connection.SupportsFileLeasing to TRUE.boolean
supportsMultiChannel()
If Connection.Dialect belongs to the SMB 3.x dialect family, the client MUST perform the following: If SMB2_GLOBAL_CAP_MULTI_CHANNEL is set in the Capabilities field of the SMB2 NEGOTIATE Response, the client MUST set Connection.SupportsMultiChannel to TRUE.boolean
supportsMultiCredit()
If the client implements SMB 2.1 or SMB 3.x dialect family, the client MUST perform the following: If SMB2_GLOBAL_CAP_LARGE_MTU is set in the Capabilities field of the SMB2 NEGOTIATE Response, the client MUST set Connection.SupportsMultiCredit to TRUE.java.lang.String
toString()
-
-
-
Method Detail
-
getClientGuid
public java.util.UUID getClientGuid()
-
isServerRequiresSigning
public boolean isServerRequiresSigning()
-
isServerSigningEnabled
public boolean isServerSigningEnabled()
-
getNegotiatedProtocol
public NegotiatedProtocol getNegotiatedProtocol()
-
getGssNegotiateToken
public byte[] getGssNegotiateToken()
-
getServerGuid
public java.util.UUID getServerGuid()
-
getServerName
public java.lang.String getServerName()
-
getClientCapabilities
public java.util.EnumSet<SMB2GlobalCapability> getClientCapabilities()
-
getWindowsVersion
public WindowsVersion getWindowsVersion()
-
setWindowsVersion
public void setWindowsVersion(WindowsVersion windowsVersion)
-
getNetBiosName
public java.lang.String getNetBiosName()
-
setNetBiosName
public void setNetBiosName(java.lang.String netBiosName)
-
getCipherId
public SMB3EncryptionCipher getCipherId()
-
supportsEncryption
public boolean supportsEncryption()
-
clientPrefersEncryption
public boolean clientPrefersEncryption()
Indicates that the client prefers encryption on this connection. This will only be enabled if the established Session has an encryptionkey set.- Returns:
true
iff the negotiated protocol is at least SMB3 and both client and server have indicated they support encryption
-
supportsDFS
public boolean supportsDFS()
-
supportsFileLeasing
public boolean supportsFileLeasing()
If the client implements SMB 2.1 or SMB 3.x dialect family, the client MUST perform the following: If SMB2_GLOBAL_CAP_LEASING is set in the Capabilities field of the SMB2 NEGOTIATE Response, the client MUST set Connection.SupportsFileLeasing to TRUE. Otherwise, it MUST be set to FALSE.- Returns:
-
supportsMultiCredit
public boolean supportsMultiCredit()
If the client implements SMB 2.1 or SMB 3.x dialect family, the client MUST perform the following: If SMB2_GLOBAL_CAP_LARGE_MTU is set in the Capabilities field of the SMB2 NEGOTIATE Response, the client MUST set Connection.SupportsMultiCredit to TRUE. Otherwise, it MUST be set to FALSE.- Returns:
-
supportsDirectoryLeasing
public boolean supportsDirectoryLeasing()
If Connection.Dialect belongs to the SMB 3.x dialect family, the client MUST perform the following: If SMB2_GLOBAL_CAP_DIRECTORY_LEASING is set in the Capabilities field of the SMB2 NEGOTIATE Response, the client MUST set Connection.SupportsDirectoryLeasing to TRUE. Otherwise, it MUST be set to FALSE.- Returns:
-
supportsMultiChannel
public boolean supportsMultiChannel()
If Connection.Dialect belongs to the SMB 3.x dialect family, the client MUST perform the following: If SMB2_GLOBAL_CAP_MULTI_CHANNEL is set in the Capabilities field of the SMB2 NEGOTIATE Response, the client MUST set Connection.SupportsMultiChannel to TRUE. Otherwise, it MUST be set to FALSE.- Returns:
-
getTimeOffsetMillis
public java.lang.Long getTimeOffsetMillis()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getServer
public Server getServer()
-
setServer
public void setServer(Server server)
-
getPreauthIntegrityHashId
public SMB3HashAlgorithm getPreauthIntegrityHashId()
-
getPreauthIntegrityHashValue
public byte[] getPreauthIntegrityHashValue()
-
getCompressionIds
public java.util.Set<SMB3CompressionAlgorithm> getCompressionIds()
-
-