1 6 7 package org.jzonic.jlo.handler; 8 9 import org.jzonic.jlo.LogRecord; 10 11 import java.util.Map ; 12 import java.util.Vector ; 13 17 public class MockHandler extends AbstractHandler { 18 19 private Vector entries; 20 private Vector messages; 21 22 public MockHandler(String configurationName) { 23 super(configurationName); 24 clear(); 25 } 26 27 public void clear() { 28 entries = new Vector (); 29 messages = new Vector (); 30 } 31 32 public Vector getLogRecords() { 33 return entries; 34 } 35 36 public Vector getMessages() { 37 return messages; 38 } 39 48 public void publish(LogRecord lr) { 49 entries.add(lr); 50 } 51 52 59 public void publish(String msg) { 60 messages.add(msg); 61 } 62 63 69 public void setParameter(Map parameters) { 70 } 71 72 } 73 | Popular Tags |