public static <T> int getAndCheckFlowRules(T paramCntr, String defValue,
            StringBuilder sBuffer,
            ProcessResult result) {
        // get parameter value
        String paramValue;
        // get parameter value
        if (paramCntr instanceof Map) {
            Map<String, String> keyValueMap =
                    (Map<String, String>) paramCntr;
            paramValue = keyValueMap.get(WebFieldDef.FLOWCTRLSET.name);
            if (paramValue == null) {
                paramValue = keyValueMap.get(WebFieldDef.FLOWCTRLSET.shortName);
            }
        } else if (paramCntr instanceof HttpServletRequest) {
            HttpServletRequest req = (HttpServletRequest) paramCntr;
            paramValue = req.getParameter(WebFieldDef.FLOWCTRLSET.name);
            if (paramValue == null) {
                paramValue = req.getParameter(WebFieldDef.FLOWCTRLSET.shortName);
            }
        } else {
            throw new IllegalArgumentException("Unknown parameter type!");
        }
        if (TStringUtils.isBlank(paramValue)) {
            result.setSuccResult(defValue);
            return 0;
        }
        paramValue = paramValue.trim();
        return validFlowRuleValue(paramValue, sBuffer, result);
    }
translate rule info to json format string

@param paramCntr   the parameter name
@param defValue    the default value
@param sBuffer     string buffer
@param result      process result
@return the count of flow control rule
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/common/utils/WebParameterUtils.java