MonitoringHandler { private String initRequestPerRuleMonitoringPath(String requestPerRuleMonitoringPath){ String str = StringUtils.trim(requestPerRuleMonitoringPath); if(StringUtils.isNotEmpty(str) && str.endsWith("/")){ str = str.substring(0, str.length()-1); } return str; } @Deprecated  MonitoringHandler(Vertx vertx, RedisClient redisClient, final ResourceStorage storage, String prefix); @Deprecated  MonitoringHandler(Vertx vertx, RedisClient redisClient, final ResourceStorage storage, String prefix, String requestPerRulePath);  MonitoringHandler(Vertx vertx, final ResourceStorage storage, String prefix);  MonitoringHandler(Vertx vertx, final ResourceStorage storage, String prefix, String requestPerRulePath); String getRequestPerRuleMonitoringPath(); boolean isRequestPerRuleMonitoringActive(); long getRequestPerRuleSampling(); long getRequestPerRuleExpiry(); void updateIncomingRequests(HttpServerRequest request); void updateRequestPerRuleMonitoring(HttpServerRequest request, String metricName); void updateRequestsMeter(String target, String uri); long startRequestMetricTracking(final String metricName, String targetUri); void stopRequestMetricTracking(final String metricName, long startTime, String targetUri); void updateQueueCountInformation(); void updateLastUsedQueueSizeInformation(final String queue); void updateQueuesSizesInformation(final int numQueues, final boolean showEmptyQueues, final MonitoringCallback callback); void updateEnqueue(); void updateDequeue(); void updateListenerCount(long count); void updateRoutesCount(long count); static final String METRIC_NAME; static final String METRIC_ACTION; static final String MARK; static final String SET; static final String REQUESTS_CLIENT_NAME; static final String REQUESTS_BACKENDS_NAME; static final String PENDING_REQUESTS_METRIC; static final String ACTIVE_QUEUE_COUNT_METRIC; static final String LAST_USED_QUEUE_SIZE_METRIC; static final String ENQUEUE_METRIC; static final String DEQUEUE_METRIC; static final String LISTENER_COUNT_METRIC; static final String ROUTE_COUNT_METRIC; @Deprecated
    static final String QUEUES_KEY_PREFIX; @Deprecated
    static final int MAX_AGE_MILLISECONDS; static final String REQUEST_PER_RULE_PREFIX; static final String REQUEST_PER_RULE_PROPERTY; static final String REQUEST_PER_RULE_SAMPLING_PROPERTY; static final String REQUEST_PER_RULE_EXPIRY_PROPERTY; static final long REQUEST_PER_RULE_DEFAULT_SAMPLING; static final long REQUEST_PER_RULE_DEFAULT_EXPIRY; }
@Test public void testInitRequestPerRuleMonitoringPath(TestContext testContext){ MonitoringHandler mh = new MonitoringHandler(vertx, storage, PREFIX); testContext.assertNull(mh.getRequestPerRuleMonitoringPath()); mh = new MonitoringHandler(vertx, storage, PREFIX, "/gateleen/monitoring/rpr/"); testContext.assertNotNull(mh.getRequestPerRuleMonitoringPath()); testContext.assertFalse(mh.getRequestPerRuleMonitoringPath().endsWith("/")); mh = new MonitoringHandler(vertx, storage, PREFIX, "/gateleen/monitoring/rpr"); testContext.assertNotNull(mh.getRequestPerRuleMonitoringPath()); testContext.assertFalse(mh.getRequestPerRuleMonitoringPath().endsWith("/")); }