public int port() {
        if (port == 0) {
            throw new IllegalStateException("port not specified");
        }
        return port;
    }
Returns the port number of this endpoint.

@throws IllegalStateException this endpoint does not have its port specified.
core/src/main/java/com/linecorp/armeria/client/Endpoint.java