Enum ConnectionType

  • All Implemented Interfaces:
    Serializable, Comparable<ConnectionType>

    public enum ConnectionType
    extends Enum<ConnectionType>
    Types of (socket-based, including HTTP) connections. This is an enumeration of the connections that are expected to be terminated by an instance of the Openfire instance, and is used to define type-specific characteristics, including but not limited to:
    • Property-name definition
    • Applicable encryption policies
    • Identity & trust store configuration
    Author:
    Guus der Kinderen, guus.der.kinderen@gmail.com
    • Enum Constant Detail

      • SOCKET_S2S

        public static final ConnectionType SOCKET_S2S
        Socket-based server-to-server (XMPP federation) connectivity.
      • SOCKET_C2S

        public static final ConnectionType SOCKET_C2S
        Socket-based client connectivity.
      • BOSH_C2S

        public static final ConnectionType BOSH_C2S
        BOSH (HTTP-bind) based client connectivity.
      • WEBADMIN

        public static final ConnectionType WEBADMIN
        Openfire web-admin console.
      • COMPONENT

        public static final ConnectionType COMPONENT
        Openfire External Component connectivity.
      • CONNECTION_MANAGER

        public static final ConnectionType CONNECTION_MANAGER
        Openfire Connection Manager (multiplexer) connectivity.
    • Method Detail

      • values

        public static ConnectionType[] 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 (ConnectionType c : ConnectionType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ConnectionType 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
        NullPointerException - if the argument is null
      • isClientOriented

        public boolean isClientOriented()
        Flag that indicates whether the connections of this type are client-oriented.
        Returns:
        true if it is SOCKET_C2S or its fallback is SOCKET_C2S.
      • getPrefix

        public String getPrefix()
        Returns the prefix used for the name of properties that are used to configure connections of this type.
        Returns:
        A property name prefix (never null or an empty string).
      • getFallback

        public ConnectionType getFallback()
        Returns a type from which configuration can be used, when configuration specific for this type is missing.
        Returns:
        A configuration fallback, or null if no such fallback exists.