code: @Override
    protected void doPost(final HttpServletRequest req, final HttpServletResponse resp)
        throws ServletException, IOException {
      final Map<String, Object> ret = new HashMap<>();
  
      if (hasParam(req, ACTION_PARAM)) {
        final String action = getParam(req, ACTION_PARAM);
        if (action.equals(STATS_SET_REPORTINGINTERVAL)) {
          handleChangeMetricInterval(req, ret);
        } else if (action.equals(STATS_SET_CLEANINGINTERVAL)) {
          handleChangeCleaningInterval(req, ret);
        } else if (action.equals(STATS_SET_MAXREPORTERPOINTS)) {
          handleChangeEmitterPoints(req, ret);
        } else if (action.equals(STATS_GET_ALLMETRICSNAME)) {
          handleGetAllMMetricsName(req, ret);
        } else if (action.equals(STATS_GET_METRICHISTORY)) {
          handleGetMetricHistory(req, ret);
        } else if (action.equals(STATS_SET_ENABLEMETRICS)) {
          handleChangeManagerStatusRequest(req, ret, true);
        } else if (action.equals(STATS_SET_DISABLEMETRICS)) {
          handleChangeManagerStatusRequest(req, ret, false);
        } else {
          ret.put(RESPONSE_ERROR, "Invalid action");
        }
      }
  
      JSONUtils.toJSON(ret, resp.getOutputStream(), true);
    }
docs: Handle all requests to Stats Servlet {@inheritDoc}