KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > archive > crawler > framework > AlertManager


1 /* AlertManager.java
2  *
3  * Created Aug 4, 2005
4  *
5  * Copyright (C) 2005 Internet Archive.
6  *
7  * This file is part of the Heritrix web crawler (crawler.archive.org).
8  *
9  * Heritrix is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU Lesser Public License as published by
11  * the Free Software Foundation; either version 2.1 of the License, or
12  * any later version.
13  *
14  * Heritrix is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Lesser Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser Public License
20  * along with Heritrix; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22  */

23 package org.archive.crawler.framework;
24
25 import java.util.Vector JavaDoc;
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: 2007/01/13 01:31:21 $ $Revision: 1.1.14.1 $
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 JavaDoc 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 JavaDoc alertID);
53
54     /**
55      * @return All current alerts
56      */

57     public Vector JavaDoc getAll();
58
59     /**
60      * @return Vector of all new alerts.
61      */

62     public Vector JavaDoc 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 JavaDoc alertID);
78 }
79
Popular Tags