public ConnectionConfiguration generateConnectionConfiguration()
    {
        final int defaultMaxPoolSize = 16;
        final int maxThreadPoolSize;
        if ( maxPoolSizePropertyName == null )
        {
            maxThreadPoolSize = defaultMaxPoolSize;
        }
        else
        {
            maxThreadPoolSize = JiveGlobals.getIntProperty( maxPoolSizePropertyName, defaultMaxPoolSize );
        }

        final int maxBufferSize;
        if ( maxReadBufferPropertyName != null )
        {
            maxBufferSize = JiveGlobals.getIntProperty( maxReadBufferPropertyName, 10 * 1024 * 1024 );
        }
        else
        {
            maxBufferSize = -1; // No upper bound.
        }

        // Take the current state of this instance, and create a new configuration.
        return new ConnectionConfiguration(
                getType(),
                isEnabled(),
                maxThreadPoolSize,
                maxBufferSize,
                getClientAuth(),
                getBindAddress(),
                getPort(),
                getTLSPolicy(),
                identityStoreConfiguration,
                trustStoreConfiguration,
                acceptSelfSignedCertificates(),
                verifyCertificateValidity(),
                verifyCertificateRevocation(),
                getEncryptionProtocols(),
                getEncryptionCipherSuites(),
                getCompressionPolicy(),
                getStrictCertificateValidation()
        );
    }
Generates an immutable ConnectionConfiguration based on the current state.

@return an immutable configuration, never null.
xmppserver/src/main/java/org/jivesoftware/openfire/spi/ConnectionListener.java