Enum ConnectionConfiguration.SecurityMode

java.lang.Object
java.lang.Enum<ConnectionConfiguration.SecurityMode>
org.jivesoftware.smack.ConnectionConfiguration.SecurityMode
All Implemented Interfaces:
Serializable, Comparable<ConnectionConfiguration.SecurityMode>
Enclosing class:
ConnectionConfiguration

An enumeration for TLS security modes that are available when making a connection to the XMPP server.
  • Enum Constant Details

    • 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

      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

      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 Details

    • values

      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null