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

scouter.lang.conf.ConfObserver Maven / Gradle / Ivy

package scouter.lang.conf;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

public class ConfObserver {
	private static Map observer = new HashMap();

	public static void add(String cls, Runnable run) {
		observer.put(cls, run);
	}

	public static void run() {
		try {
			Iterator itr = observer.values().iterator();
			while (itr.hasNext()) {
				itr.next().run();
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy