class SslEngineFactoryBase implements SslEngineFactory {

    protected String domain(String hostname) {
        int fqdnLength = hostname.length() - 1;
        return hostname.charAt(fqdnLength) == '.' ? hostname.substring(0, fqdnLength) : hostname;
    }

    protected void configureSslEngine(SSLEngine sslEngine, AsyncHttpClientConfig config) {<FILL_FUNCTION_BODY>}
}

        sslEngine.setUseClientMode(true);
        if (!config.isDisableHttpsEndpointIdentificationAlgorithm()) {
            SSLParameters params = sslEngine.getSSLParameters();
            params.setEndpointIdentificationAlgorithm("HTTPS");
            sslEngine.setSSLParameters(params);
        }
    
<no_super_class>