Package io.vertx.mongo.connection
Class SslSettings
- java.lang.Object
-
- io.vertx.mongo.connection.SslSettings
-
public class SslSettings extends java.lang.Object
Settings for connecting to MongoDB via SSL.- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description SslSettings()
SslSettings(JsonObject json)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Boolean
isEnabled()
Returns whether SSL is enabled.java.lang.Boolean
isInvalidHostNameAllowed()
Returns whether invalid host names should be allowed.SslSettings
setEnabled(java.lang.Boolean enabled)
Define whether SSL should be enabled.SslSettings
setInvalidHostNameAllowed(java.lang.Boolean invalidHostNameAllowed)
Define whether invalid host names should be allowed.JsonObject
toJson()
-
-
-
Constructor Detail
-
SslSettings
public SslSettings()
-
SslSettings
public SslSettings(JsonObject json)
-
-
Method Detail
-
toJson
public JsonObject toJson()
-
setEnabled
public SslSettings setEnabled(java.lang.Boolean enabled)
Define whether SSL should be enabled.- Parameters:
enabled
- should be true if SSL is to be enabled.- Returns:
- this
-
isEnabled
public java.lang.Boolean isEnabled()
Returns whether SSL is enabled.- Returns:
- true if SSL is enabled.
-
setInvalidHostNameAllowed
public SslSettings setInvalidHostNameAllowed(java.lang.Boolean invalidHostNameAllowed)
Define whether invalid host names should be allowed. Defaults to false. Take care before setting this to true, as it makes the application susceptible to man-in-the-middle attacks.- Parameters:
invalidHostNameAllowed
- whether invalid host names are allowed.- Returns:
- this
-
isInvalidHostNameAllowed
public java.lang.Boolean isInvalidHostNameAllowed()
Returns whether invalid host names should be allowed. Defaults to false. Take care before setting this to true, as it makes the application susceptible to man-in-the-middle attacks.- Returns:
- true if invalid host names are allowed.
-
-