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

com.ajjpj.asysmon.measure.environment.AEnvironmentMeasurer Maven / Gradle / Ivy

There is a newer version: 1.0-pre28
Show newest version
package com.ajjpj.asysmon.measure.environment;

import com.ajjpj.abase.collection.immutable.AList;
import com.ajjpj.asysmon.util.AShutdownable;

import java.util.List;


/**
 * @author arno
 */
public interface AEnvironmentMeasurer extends AShutdownable {
    /**
     * @param data is a 'collectiong parameter', i.e. the method adds its own results to the existing collection.
     */
    void contributeMeasurements(EnvironmentCollector data) throws Exception;

    class EnvironmentCollector {
        public final List data;

        public EnvironmentCollector(List data) {
            this.data = data;
        }

        public void add(String value, String... key) {
            final AList fullKey = AList.create(key);
            data.add(new AEnvironmentData(fullKey, value));
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy