String determineAdvertisedProtocol() {
        String advertisedSecurityProtocol = config.advertisedListener();
        if (advertisedSecurityProtocol == null) {
            String listeners = config.rawListeners();

            if (listeners == null)
                return PROTOCOL_HTTP;
            else
                listeners = listeners.toLowerCase(Locale.ENGLISH);

            if (listeners.contains(String.format("%s://", PROTOCOL_HTTP)))
                return PROTOCOL_HTTP;
            else if (listeners.contains(String.format("%s://", PROTOCOL_HTTPS)))
                return PROTOCOL_HTTPS;
            else
                return PROTOCOL_HTTP;
        } else {
            return advertisedSecurityProtocol.toLowerCase(Locale.ENGLISH);
        }
    }
@return the admin url for this worker. Can be null if admin endpoints are disabled.
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/RestServer.java