Record Class MongoSslConfiguration
java.lang.Object
java.lang.Record
dev.getelements.elements.sdk.mongo.MongoSslConfiguration
- Record Components:
keyManager- one or more KeyManagers to use for SSL connections these contain the client key materialtrustManager- one or more TrustManagers to use for SSL connections these contain the trusted CA certificates
public record MongoSslConfiguration(KeyManager[] keyManager, TrustManager[] trustManager, String sslProtocol, boolean sslInvalidHostNamesAllowed)
extends Record
The MongoDB SSL configuration record. Contains SSL Specific configuration for MongoDB connections.
-
Constructor Summary
ConstructorsConstructorDescriptionMongoSslConfiguration(KeyManager[] keyManager, TrustManager[] trustManager, String sslProtocol, boolean sslInvalidHostNamesAllowed) Creates an instance of aMongoSslConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thekeyManagerrecord component.Creates a newSSLContextfrom the SSL configuration.booleanReturns the value of thesslInvalidHostNamesAllowedrecord component.Returns the value of thesslProtocolrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetrustManagerrecord component.
-
Constructor Details
-
MongoSslConfiguration
public MongoSslConfiguration(KeyManager[] keyManager, TrustManager[] trustManager, String sslProtocol, boolean sslInvalidHostNamesAllowed) Creates an instance of aMongoSslConfigurationrecord class.- Parameters:
keyManager- the value for thekeyManagerrecord componenttrustManager- the value for thetrustManagerrecord componentsslProtocol- the value for thesslProtocolrecord componentsslInvalidHostNamesAllowed- the value for thesslInvalidHostNamesAllowedrecord component
-
-
Method Details
-
newSslContext
Creates a newSSLContextfrom the SSL configuration.- Returns:
- the new SSLContext
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
keyManager
Returns the value of thekeyManagerrecord component.- Returns:
- the value of the
keyManagerrecord component
-
trustManager
Returns the value of thetrustManagerrecord component.- Returns:
- the value of the
trustManagerrecord component
-
sslProtocol
Returns the value of thesslProtocolrecord component.- Returns:
- the value of the
sslProtocolrecord component
-
sslInvalidHostNamesAllowed
public boolean sslInvalidHostNamesAllowed()Returns the value of thesslInvalidHostNamesAllowedrecord component.- Returns:
- the value of the
sslInvalidHostNamesAllowedrecord component
-