Package com.mongodb.connection
Class SslSettings
java.lang.Object
com.mongodb.connection.SslSettings
Settings for connecting to MongoDB via SSL.
- Since:
 - 3.0
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA builder for creating SSLSettings. - 
Method Summary
Modifier and TypeMethodDescriptionstatic SslSettings.Builderbuilder()Gets a Builder for creating a new SSLSettings instance.static SslSettings.Builderbuilder(SslSettings sslSettings) Creates a builder instance.booleanGets the SSLContext configured for use with SSL connections.inthashCode()booleanReturns whether SSL is enabled.booleanReturns whether invalid host names should be allowed.toString() 
- 
Method Details
- 
builder
Gets a Builder for creating a new SSLSettings instance.- Returns:
 - a new Builder for SSLSettings.
 
 - 
builder
Creates a builder instance.- Parameters:
 sslSettings- existing SslSettings to default the builder settings on.- Returns:
 - a builder
 - Since:
 - 3.7
 
 - 
isEnabled
public boolean isEnabled()Returns whether SSL is enabled.- Returns:
 - true if SSL is enabled.
 
 - 
isInvalidHostNameAllowed
public 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.
 
 - 
getContext
Gets the SSLContext configured for use with SSL connections.- Returns:
 - the SSLContext, which defaults to null if not configured.  In that case 
SSLContext.getDefault()will be used if SSL is enabled. - Since:
 - 3.5
 - See Also:
 
 - 
equals
 - 
hashCode
public int hashCode() - 
toString
 
 -