Enum ConnectionConfiguration.SecurityMode

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      disabled
      Security via TLS encryption is disabled and only un-encrypted connections will be used.
      ifpossible
      Security via TLS encryption is used whenever it's available.
      required
      Security via TLS encryption is required in order to connect.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ConnectionConfiguration.SecurityMode valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static ConnectionConfiguration.SecurityMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • required

        public static final ConnectionConfiguration.SecurityMode required
        Security via TLS encryption is required in order to connect. If the server does not offer TLS or if the TLS negotiation fails, the connection to the server will fail.
      • ifpossible

        public static final ConnectionConfiguration.SecurityMode ifpossible
        Security via TLS encryption is used whenever it's available. This is the default setting.

        Do not use this setting unless you can't use required. An attacker could easily perform a Man-in-the-middle attack and prevent TLS from being used, leaving you with an unencrypted (and unauthenticated) connection.

      • disabled

        public static final ConnectionConfiguration.SecurityMode disabled
        Security via TLS encryption is disabled and only un-encrypted connections will be used. If only TLS encryption is available from the server, the connection will fail.
    • Method Detail

      • values

        public static ConnectionConfiguration.SecurityMode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ConnectionConfiguration.SecurityMode c : ConnectionConfiguration.SecurityMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ConnectionConfiguration.SecurityMode valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null