private static int port(Server server, SessionProtocol protocol, @Nullable Integer port) {
        if (port != null) {
            warnIfInactivePort(server, port, protocol);
            return port;
        }
        final ServerPort serverPort = server.activePort(protocol);
        return serverPort != null ? serverPort.localAddress().getPort() : -1;
    }
Returns a {@link ZooKeeperUpdatingListenerBuilder} with a ZooKeeper connection string and a znode path.

@param zkConnectionStr the ZooKeeper connection string
@param znodePath the ZooKeeper node to register
@param spec the {@link ZooKeeperRegistrationSpec} to encode and register the {@link Server}
zookeeper3/src/main/java/com/linecorp/armeria/server/zookeeper/ZooKeeperUpdatingListener.java