@NotThreadSafe public static class SslSettings.Builder extends java.lang.Object
| 构造器和说明 |
|---|
Builder() |
| 限定符和类型 | 方法和说明 |
|---|---|
SslSettings.Builder |
applyConnectionString(ConnectionString connectionString)
Take the settings from the given ConnectionString and set them in this builder.
|
SslSettings |
build()
Create a new SSLSettings from the settings in this builder.
|
SslSettings.Builder |
enabled(boolean enabled)
Define whether SSL should be enabled.
|
SslSettings.Builder |
invalidHostNameAllowed(boolean invalidHostNameAllowed)
Define whether invalid host names should be allowed.
|
public SslSettings.Builder enabled(boolean enabled)
enabled - should be true if SSL is to be enabled.public SslSettings.Builder invalidHostNameAllowed(boolean invalidHostNameAllowed)
invalidHostNameAllowed - whether invalid host names are allowed.public SslSettings.Builder applyConnectionString(ConnectionString connectionString)
connectionString - a URI with details on how to connect to MongoDB.public SslSettings build()
MongoInternalException - if enabled is true, invalidHostNameAllowed is false, and the "java.version"
system property starts with 1.6