Smack

org.jivesoftware.smack
Enum ConnectionConfiguration.SecurityMode

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

public static enum ConnectionConfiguration.SecurityMode
extends Enum<ConnectionConfiguration.SecurityMode>

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


Enum Constant Summary
disabled
          Security via TLS encryption is disabled and only un-encrypted connections will be used.
enabled
          Security via TLS encryption is used whenever it's available.
required
          Securirty via TLS encryption is required in order to connect.
 
Method Summary
static ConnectionConfiguration.SecurityMode valueOf(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're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

required

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


enabled

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


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 final ConnectionConfiguration.SecurityMode[] values()
Returns an array containing the constants of this enum type, in the order they're 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're declared

valueOf

public static ConnectionConfiguration.SecurityMode valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name

Smack

Copyright © 2003-2007 Jive Software.