1 /* 2 * (c) Rob Gordon 2005 3 */ 4 package org.oddjob.logging; 5 6 /** 7 * A ConsoleArchiver is something which has archived away console messages 8 * for different consoles. 9 */ 10 public interface ConsoleArchiver { 11 12 /** 13 * Add a listener to the archiver which will receive all missed 14 * events. The idea of receiving only missed event is to minimise 15 * network traffic when used remotely. 16 * 17 * @param l The logListener which will recieve the events. 18 * @param component The component whose console to receive events for. 19 * @param last The last event number recieved. The LogArchive will 20 * not send messages from before this number. 21 * @param max The maximum messages to send up to the most recent. 22 */ 23 public void addConsoleListener(LogListener l, Object component, 24 long last, int max); 25 26 /** 27 * Remove the LogListener. 28 * 29 * @param l The LogListener. 30 */ 31 public void removeConsoleListener(LogListener l, Object component); 32 33 /** 34 * Get the console id for a given component. 35 * 36 * @param component The component. 37 * @return The console id. 38 */ 39 public String consoleIdFor(Object component); 40 41 } 42