de.intarsys.tools.logging.MemoryLogRegistry Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of isrt Show documentation
Show all versions of isrt Show documentation
The basic runtime tools and interfaces for intarsys components.
package de.intarsys.tools.logging;
import java.util.HashMap;
import java.util.Map;
public class MemoryLogRegistry {
final private static MemoryLogRegistry ACTIVE = new MemoryLogRegistry();
public static MemoryLogRegistry get() {
return ACTIVE;
}
final private Map handlers = new HashMap();
public MemoryLogHandler[] getHandlers() {
return (MemoryLogHandler[]) handlers.values().toArray();
}
public MemoryLogHandler lookup(String id) {
return handlers.get(id);
}
public void register(MemoryLogHandler handler) {
handlers.put(handler.getId(), handler);
}
public void unregister(MemoryLogHandler handler) {
handlers.remove(handler.getId());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy