public void stop() {
        if (acceptor != null)
            acceptor.shutdown().join();
        if (supervisor != null)
            supervisor.transport().shutdown().join();
    }
Adds a method. If a method with the same name already exists, it will be replaced.
@param method The method to add.
metrics-proxy/src/main/java/ai/vespa/metricsproxy/rpc/RpcConnector.java