@Test public void stopShouldCloseEnclosedClient() throws IOException { new DatadogReporter(registry, client, "foo", Option.empty(), Option.empty(), MetricFilter.ALL, TimeUnit.SECONDS, TimeUnit.SECONDS).stop(); verify(client).close(); }
@Override public void stop() { try { super.stop(); } finally { try { client.close(); } catch (IOException e) { LOG.warn("Error disconnecting from Datadog.", e); } } }
DatadogReporter extends ScheduledReporter { @Override public void stop() { try { super.stop(); } finally { try { client.close(); } catch (IOException e) { LOG.warn("Error disconnecting from Datadog.", e); } } } }
DatadogReporter extends ScheduledReporter { @Override public void stop() { try { super.stop(); } finally { try { client.close(); } catch (IOException e) { LOG.warn("Error disconnecting from Datadog.", e); } } } protected  DatadogReporter(
      MetricRegistry registry,
      DatadogHttpClient client,
      String prefix,
      Option<String> host,
      Option<List<String>> tags,
      MetricFilter filter,
      TimeUnit rateUnit,
      TimeUnit durationUnit); }
DatadogReporter extends ScheduledReporter { @Override public void stop() { try { super.stop(); } finally { try { client.close(); } catch (IOException e) { LOG.warn("Error disconnecting from Datadog.", e); } } } protected  DatadogReporter(
      MetricRegistry registry,
      DatadogHttpClient client,
      String prefix,
      Option<String> host,
      Option<List<String>> tags,
      MetricFilter filter,
      TimeUnit rateUnit,
      TimeUnit durationUnit); @Override void report(
      SortedMap<String, Gauge> gauges,
      SortedMap<String, Counter> counters,
      SortedMap<String, Histogram> histograms,
      SortedMap<String, Meter> meters,
      SortedMap<String, Timer> timers); @Override void stop(); }
DatadogReporter extends ScheduledReporter { @Override public void stop() { try { super.stop(); } finally { try { client.close(); } catch (IOException e) { LOG.warn("Error disconnecting from Datadog.", e); } } } protected  DatadogReporter(
      MetricRegistry registry,
      DatadogHttpClient client,
      String prefix,
      Option<String> host,
      Option<List<String>> tags,
      MetricFilter filter,
      TimeUnit rateUnit,
      TimeUnit durationUnit); @Override void report(
      SortedMap<String, Gauge> gauges,
      SortedMap<String, Counter> counters,
      SortedMap<String, Histogram> histograms,
      SortedMap<String, Meter> meters,
      SortedMap<String, Timer> timers); @Override void stop();  }