class AbstractPrometheusParse {

    /**
     * Downstream node
     */
    private AbstractPrometheusParse prometheusParse;

    AbstractPrometheusParse() {
    }

    public AbstractPrometheusParse setInstance(AbstractPrometheusParse prometheusParse) {
        this.prometheusParse = prometheusParse;
        return this;
    }

    /**
     * prom response type check: string, matrix, vector, scalar
     * todo：string、scalar类型响应未实现
     * @param responseStr 返回字符串
     * @return return
     */
    abstract Boolean checkType(String responseStr);

    /**
     * Parse the prom interface response data
     * @param resp 返回数据
     * @param aliasFields alias fields
     * @param http httpProtocol
     * @param builder builder
     */
    abstract void parse(String resp, List<String> aliasFields, HttpProtocol http,
                        CollectRep.MetricsData.Builder builder);

    /**
     * Processing prom interface response data
     * @param resp resp
     * @param aliasFields alias fields
     * @param http http
     * @param builder builder
     */
    public void handle(String resp, List<String> aliasFields, HttpProtocol http,
                       CollectRep.MetricsData.Builder builder) {<FILL_FUNCTION_BODY>}


}

        if (checkType(resp)) {
            parse(resp, aliasFields, http,
                    builder);
        } else {
            prometheusParse.handle(resp, aliasFields, http,
                    builder);
        }
    
<no_super_class>