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 material
trustManager - 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 Details

    • MongoSslConfiguration

      public MongoSslConfiguration(KeyManager[] keyManager, TrustManager[] trustManager, String sslProtocol, boolean sslInvalidHostNamesAllowed)
      Creates an instance of a MongoSslConfiguration record class.
      Parameters:
      keyManager - the value for the keyManager record component
      trustManager - the value for the trustManager record component
      sslProtocol - the value for the sslProtocol record component
      sslInvalidHostNamesAllowed - the value for the sslInvalidHostNamesAllowed record component
  • Method Details

    • newSslContext

      public SSLContext newSslContext()
      Creates a new SSLContext from the SSL configuration.
      Returns:
      the new SSLContext
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • keyManager

      public KeyManager[] keyManager()
      Returns the value of the keyManager record component.
      Returns:
      the value of the keyManager record component
    • trustManager

      public TrustManager[] trustManager()
      Returns the value of the trustManager record component.
      Returns:
      the value of the trustManager record component
    • sslProtocol

      public String sslProtocol()
      Returns the value of the sslProtocol record component.
      Returns:
      the value of the sslProtocol record component
    • sslInvalidHostNamesAllowed

      public boolean sslInvalidHostNamesAllowed()
      Returns the value of the sslInvalidHostNamesAllowed record component.
      Returns:
      the value of the sslInvalidHostNamesAllowed record component