Class Slf4jReporter

    • Constructor Detail

      • Slf4jReporter

        public Slf4jReporter()
    • Method Detail

      • open

        public void open​(MetricConfig metricConfig)
        Description copied from interface: MetricReporter
        Configures this reporter.

        If the reporter was instantiated generically and hence parameter-less, this method is the place where the reporter sets it's basic fields based on configuration values. Otherwise, this method will typically be a no-op since resources can be acquired in the constructor.

        This method is always called first on a newly instantiated reporter.

        Specified by:
        open in interface MetricReporter
        Parameters:
        metricConfig - A properties object that contains all parameters set for this reporter.
      • close

        public void close()
        Description copied from interface: MetricReporter
        Closes this reporter. Should be used to close channels, streams and release resources.
        Specified by:
        close in interface MetricReporter
      • report

        public void report()
        Description copied from interface: Scheduled
        Report the current measurements. This method is called periodically by the metrics registry that uses the reporter. This method must not block for a significant amount of time, any reporter needing more time should instead run the operation asynchronously.
        Specified by:
        report in interface Scheduled
      • filterCharacters

        public String filterCharacters​(String input)
        Description copied from interface: CharacterFilter
        Filter the given string and generate a resulting string from it.

        For example, one implementation could filter out invalid characters from the input string.

        Specified by:
        filterCharacters in interface CharacterFilter
        Parameters:
        input - Input string
        Returns:
        Filtered result string