protected final void registerRestExtensions(Herder herder, ResourceConfig resourceConfig) {
        connectRestExtensions = herder.plugins().newPlugins(
            config.restExtensions(),
            config, ConnectRestExtension.class);

        long herderRequestTimeoutMs = DEFAULT_REST_REQUEST_TIMEOUT_MS;

        Integer rebalanceTimeoutMs = config.rebalanceTimeoutMs();

        if (rebalanceTimeoutMs != null) {
            herderRequestTimeoutMs = Math.min(herderRequestTimeoutMs, rebalanceTimeoutMs.longValue());
        }

        ConnectClusterDetails connectClusterDetails = new ConnectClusterDetailsImpl(
            herder.kafkaClusterId()
        );

        ConnectRestExtensionContext connectRestExtensionContext =
            new ConnectRestExtensionContextImpl(
                new ConnectRestConfigurable(resourceConfig),
                new ConnectClusterStateImpl(herderRequestTimeoutMs, connectClusterDetails, herder)
            );
        for (ConnectRestExtension connectRestExtension : connectRestExtensions) {
            connectRestExtension.register(connectRestExtensionContext);
        }

    }
Locate a Jetty connector for the standard (non-admin) REST API that uses the given protocol.
@param protocol the protocol for the connector (e.g., "http" or "https").
@return a {@link ServerConnector} for the server that uses the requested protocol, or
{@code null} if none exist.
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/RestServer.java