ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/client/alerters/WebFeeder__Alerter.java
Revision: 1.1
Committed: Wed Mar 7 01:55:54 2001 UTC (23 years, 2 months ago) by tdb
Branch: MAIN
Log Message:
Added a new part of the local client called the WebFeeder. This class consists
of three parts;
WebFeeder__Monitor: provides a feed of XMLPackets to the WebFeeder
WebFeeder__Alerter: provides a feed of Alerts to the WebFeeder
WebFeeder: a singleton class that will manage dumping of XMLPackets and Alerts
This data will be written out in a textual format, although this secion has not
been completed.
The WebFeeder may also provide configuration information, if required.

File Contents

# User Rev Content
1 tdb 1.1 //---PACKAGE DECLARATION---
2     package uk.ac.ukc.iscream.client.alerters;
3    
4     //---IMPORTS---
5     import uk.ac.ukc.iscream.client.*;
6     import uk.ac.ukc.iscream.core.*;
7     import uk.ac.ukc.iscream.util.*;
8     import uk.ac.ukc.iscream.componentmanager.*;
9    
10     /**
11     * Provides a full Alert feed to the WebFeeder
12     *
13     * @author $Author$
14     * @version $Id$
15     */
16     public class WebFeeder__Alerter implements PluginAlerter {
17    
18     //---FINAL ATTRIBUTES---
19    
20     /**
21     * The current CVS revision of this class
22     */
23     public static final String REVISION = "$Revision: 1.1 $";
24    
25     public static final String DESC = "Provides a feed to WebFeeder";
26    
27     //---STATIC METHODS---
28    
29     //---CONSTRUCTORS---
30    
31     public WebFeeder__Alerter() {
32     _webFeeder = WebFeeder.getInstance();
33     }
34    
35     //---PUBLIC METHODS---
36    
37     public void sendAlert(Alert alert) {
38     _webFeeder.receiveAlert(alert);
39     }
40    
41     public String getDescription() {
42     return DESC;
43     }
44    
45     /**
46     * Overrides the {@link java.lang.Object#toString() Object.toString()}
47     * method to provide clean logging (every class should have this).
48     *
49     * This uses the uk.ac.ukc.iscream.util.FormatName class
50     * to format the toString()
51     *
52     * @return the name of this class and its CVS revision
53     */
54     public String toString() {
55     return FormatName.getName(
56     _name,
57     getClass().getName(),
58     REVISION);
59     }
60    
61     //---PRIVATE METHODS---
62    
63     //---ACCESSOR/MUTATOR METHODS---
64    
65     //---ATTRIBUTES---
66    
67     // reference to the WebFeeder
68     WebFeeder _webFeeder;
69    
70     /**
71     * This is the friendly identifier of the
72     * component this class is running in.
73     * eg, a Filter may be called "filter1",
74     * If this class does not have an owning
75     * component, a name from the configuration
76     * can be placed here. This name could also
77     * be changed to null for utility classes.
78     */
79     private String _name = "WebFeeder";
80    
81     /**
82     * This holds a reference to the
83     * system logger that is being used.
84     */
85     private Logger _logger = ReferenceManager.getInstance().getLogger();
86    
87     //---STATIC ATTRIBUTES---
88    
89     }