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.12
Committed: Wed Feb 5 16:43:45 2003 UTC (21 years, 3 months ago) by tdb
Branch: MAIN
Changes since 1.11: +4 -4 lines
Log Message:
Changed the server to use the external util package. Quite a minor change,
but does affect a lot of files.

File Contents

# User Rev Content
1 tdb 1.10 /*
2     * i-scream central monitoring system
3 tdb 1.11 * http://www.i-scream.org.uk
4 tdb 1.10 * Copyright (C) 2000-2002 i-scream
5     *
6     * This program is free software; you can redistribute it and/or
7     * modify it under the terms of the GNU General Public License
8     * as published by the Free Software Foundation; either version 2
9     * of the License, or (at your option) any later version.
10     *
11     * This program is distributed in the hope that it will be useful,
12     * but WITHOUT ANY WARRANTY; without even the implied warranty of
13     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14     * GNU General Public License for more details.
15     *
16     * You should have received a copy of the GNU General Public License
17     * along with this program; if not, write to the Free Software
18     * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19     */
20    
21 tdb 1.1 //---PACKAGE DECLARATION---
22 tdb 1.9 package uk.org.iscream.cms.server.client.alerters;
23 tdb 1.1
24     //---IMPORTS---
25 tdb 1.9 import uk.org.iscream.cms.server.client.*;
26     import uk.org.iscream.cms.server.core.*;
27 tdb 1.12 import uk.org.iscream.cms.util.*;
28 tdb 1.9 import uk.org.iscream.cms.server.componentmanager.*;
29 tdb 1.1
30     /**
31 ajm 1.6 * Provides a full Alert feed to the singleton instnace
32     * of the WebFeeder.
33 tdb 1.1 *
34 ajm 1.6 * See the WebFeeder class for details.
35     *
36 tdb 1.10 * @author $Author: tdb $
37 tdb 1.12 * @version $Id: WebFeeder__Alerter.java,v 1.11 2002/05/21 16:47:16 tdb Exp $
38 tdb 1.1 */
39 ajm 1.6 public class WebFeeder__Alerter extends AlerterSkeleton {
40 tdb 1.1
41     //---FINAL ATTRIBUTES---
42    
43     /**
44     * The current CVS revision of this class
45     */
46 tdb 1.12 public static final String REVISION = "$Revision: 1.11 $";
47 tdb 1.1
48 ajm 1.6 /**
49     * A description of this alerter
50     */
51 tdb 1.1 public static final String DESC = "Provides a feed to WebFeeder";
52    
53     //---STATIC METHODS---
54    
55     //---CONSTRUCTORS---
56    
57     //---PUBLIC METHODS---
58    
59     public void sendAlert(Alert alert) {
60 tdb 1.2 try {
61 ajm 1.6 _cp.getInstance().getProperty("WebFeeder", "WebFeeder.alertActive");
62 tdb 1.7 WebFeeder.getInstance().receiveAlert(alert);
63 tdb 1.2 } catch (PropertyNotFoundException e) {
64 ajm 1.6 // we don't care, this means we shouldn't be active
65 tdb 1.2 }
66 tdb 1.1 }
67    
68 ajm 1.6 /**
69     * Return the String representation of what the alerter does
70     *
71     * @return the description
72     */
73 tdb 1.1 public String getDescription() {
74     return DESC;
75     }
76    
77     /**
78     * Overrides the {@link java.lang.Object#toString() Object.toString()}
79     * method to provide clean logging (every class should have this).
80     *
81 tdb 1.12 * This uses the uk.org.iscream.cms.util.FormatName class
82 tdb 1.1 * to format the toString()
83     *
84     * @return the name of this class and its CVS revision
85     */
86     public String toString() {
87     return FormatName.getName(
88     _name,
89     getClass().getName(),
90     REVISION);
91     }
92    
93     //---PRIVATE METHODS---
94    
95     //---ACCESSOR/MUTATOR METHODS---
96 tdb 1.8
97     /**
98     * Returns the "friendly" name of this class. This
99     * is simply an accessor for _name, required due to
100     * inheritance issues with extending AlerterSkeleton.
101     *
102     * @return the friendly name
103     */
104     protected String getFName() {
105     return _name;
106     }
107 tdb 1.1
108     //---ATTRIBUTES---
109    
110     /**
111     * This is the friendly identifier of the
112     * component this class is running in.
113     * eg, a Filter may be called "filter1",
114     * If this class does not have an owning
115     * component, a name from the configuration
116     * can be placed here. This name could also
117     * be changed to null for utility classes.
118     */
119     private String _name = "WebFeeder";
120    
121     //---STATIC ATTRIBUTES---
122    
123     }