1 package org.oddjob.monitor.model; 2 3 import java.util.Observable ; 4 5 import org.oddjob.logging.LogEvent; 6 import org.oddjob.logging.LogListener; 7 8 10 11 public class LogModel extends Observable implements LogListener { 12 13 public void setUnAvailable() { 14 LogAction e = new UnavailableEvent(); 15 setChanged(); 16 notifyObservers(e); 17 } 18 19 public void setClear() { 20 LogAction e = new ClearEvent(); 21 setChanged(); 22 notifyObservers(e); 23 } 24 25 public void logEvent(LogEvent event) { 26 LogAction e = new MessageEvent ( 27 event.getMessage(), event.getLevel()); 28 setChanged(); 29 notifyObservers(e); 30 } 31 32 } 33 | Popular Tags |