KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > oddjob > logging > LogArchiver


1 /*
2  * (c) Rob Gordon 2005
3  */

4 package org.oddjob.logging;
5
6 /**
7  * A LogArchiver is something which has archived away log messages for different
8  * components. A components archived log messages are identified by an archive
9  * name so that just messages for a component (or archive) can be retrieved.
10  */

11 public interface LogArchiver {
12
13     public static final int MAX_HISTORY = 1000;
14     
15     /**
16      * Add a listener to the archiver which will receive all missed
17      * events. The idea of receiving only missed event is to minimise
18      * network traffic when used remotely.
19      *
20      * @param l The logListener which will recieve the events.
21      * @param archive The archive to receive events for.
22      * @param level The level of events required.
23      * @param last The last event number recieved. The LogArchive will
24      * not send messages from before this number.
25      * @param max The maximum messages to send up to the most recent.
26      */

27     public void addLogListener(LogListener l, Object JavaDoc component,
28             LogLevel level, long last, int max);
29     
30     /**
31      * Remove the LogListener.
32      *
33      * @param l The LogListener.
34      */

35     public void removeLogListener(LogListener l, Object JavaDoc component);
36
37 }
38
Popular Tags