1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package org.archive.crawler.framework;
24
25 import java.util.Vector;
26
27 import org.archive.io.SinkHandlerLogRecord;
28
29
30 /***
31 * Manager for application alerts.
32 * An alert is a message to a human operator created by Heritrix when
33 * exceptional conditions.
34 * @author stack
35 * @version $Date: 2006-09-25 23:59:43 +0000 (Mon, 25 Sep 2006) $ $Revision: 4664 $
36 */
37 public interface AlertManager {
38 /***
39 * @param record The new alert to add.
40 */
41 public void add(final SinkHandlerLogRecord record);
42
43 /***
44 * @param alertID the ID of the alert to remove.
45 */
46 public void remove(final String alertID);
47
48 /***
49 * @param alertID The ID of the alert to return.
50 * @return an alert with the given ID or null if none found.
51 */
52 public SinkHandlerLogRecord get(final String alertID);
53
54 /***
55 * @return All current alerts
56 */
57 public Vector getAll();
58
59 /***
60 * @return Vector of all new alerts.
61 */
62 public Vector getNewAll();
63
64 /***
65 * @return The number of alerts
66 */
67 public int getCount();
68
69 /***
70 * @return The number of new alerts
71 */
72 public int getNewCount();
73
74 /***
75 * @param alertID of the ID of the alert to mark as 'seen'.
76 */
77 public void read(final String alertID);
78 }