public Set<String> getEncryptionProtocols()
    {
        final Set<String> result = new LinkedHashSet<>();
        final String csv = getEncryptionProtocolsCommaSeparated();
        if ( csv.isEmpty() ) {
            try {
                result.addAll( EncryptionArtifactFactory.getDefaultProtocols() );
            } catch ( Exception ex ) {
                Log.error( "An error occurred while obtaining the default encryption protocol setting.", ex );
            }
        } else {
            result.addAll( Arrays.asList( csv.split( "\\s*,\\s*" ) ) );
        }

        // OF-1118: Do not return protocols that are not supported by the implementation.
        try {
            result.retainAll( EncryptionArtifactFactory.getSupportedProtocols() );
        } catch ( Exception ex ) {
            Log.error( "An error occurred while obtaining the supported encryption protocols.", ex );
        }

        return result;
    }
A collection of protocol names that can be used for encryption of connections.

When non-empty, the list is intended to specify those protocols (from a larger collection of implementation-
supported protocols) that can be used to establish encryption.

The order over which values are iterated in the result is equal to the order of values in the comma-separated
configuration string. This can, but is not guaranteed to, indicate preference.

@return An (ordered) set of protocols, never null but possibly empty.
xmppserver/src/main/java/org/jivesoftware/openfire/spi/ConnectionListener.java