Package com.mongodb
Class ClientEncryptionSettings.Builder
java.lang.Object
com.mongodb.ClientEncryptionSettings.Builder
- Enclosing class:
- ClientEncryptionSettings
A builder for
ClientEncryptionSettings so that ClientEncryptionSettings can be immutable, and to support easier
construction through chaining.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build an instance ofClientEncryptionSettings.keyVaultMongoClientSettings(MongoClientSettings keyVaultMongoClientSettings) Sets theMongoClientSettingsthat will be used to access the key vault.keyVaultNamespace(String keyVaultNamespace) Sets the key vault namespacekmsProviderPropertySuppliers(Map<Object>>> kmsProviderPropertySuppliers) This method is similar tokmsProviders(Map), but instead of setting properties for KMS providers, it setsSuppliers of properties.kmsProviders(String, Object>> kmsProviders) Sets the KMS providers map.kmsProviderSslContextMap(SSLContext> kmsProviderSslContextMap) Sets the KMS provider to SSLContext map-
Method Details
-
keyVaultMongoClientSettings
public ClientEncryptionSettings.Builder keyVaultMongoClientSettings(MongoClientSettings keyVaultMongoClientSettings) Sets theMongoClientSettingsthat will be used to access the key vault.- Parameters:
keyVaultMongoClientSettings- the key vault mongo client settings, which may not be null.- Returns:
- this
- See Also:
-
keyVaultNamespace
Sets the key vault namespace- Parameters:
keyVaultNamespace- the key vault namespace, which may not be null- Returns:
- this
- See Also:
-
kmsProviders
Sets the KMS providers map.- Parameters:
kmsProviders- the KMS providers map, which may not be null- Returns:
- this
- See Also:
-
kmsProviderPropertySuppliers
public ClientEncryptionSettings.Builder kmsProviderPropertySuppliers(Map<Object>>> kmsProviderPropertySuppliers) This method is similar tokmsProviders(Map), but instead of setting properties for KMS providers, it setsSuppliers of properties. -
kmsProviderSslContextMap
public ClientEncryptionSettings.Builder kmsProviderSslContextMap(SSLContext> kmsProviderSslContextMap) Sets the KMS provider to SSLContext map- Parameters:
kmsProviderSslContextMap- the KMS provider to SSLContext map, which may not be null- Returns:
- this
- Since:
- 4.4
- See Also:
-
build
Build an instance ofClientEncryptionSettings.- Returns:
- the settings from this builder
-
-