All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jmeterplugins.repository.http.StatsReporter Maven / Gradle / Ivy

There is a newer version: 1.10
Show newest version
package org.jmeterplugins.repository.http;

import org.apache.jorphan.logging.LoggingManager;
import org.apache.log.Logger;
import org.jmeterplugins.repository.JARSource;

import java.io.IOException;

public class StatsReporter extends Thread {
    private static final Logger log = LoggingManager.getLoggerForClass();

    private final JARSource jarSource;
    private final String[] usageStats;

    public StatsReporter(JARSource jarSource, String[] usageStats) {
        this.jarSource = jarSource;
        this.usageStats = usageStats;
        setDaemon(true);
    }

    @Override
    public void run() {
        try {
            jarSource.reportStats(usageStats);
        } catch (IOException e) {
            log.warn("Failed to send repo stats", e);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy