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/AlerterSkeleton.java
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/client/AlerterSkeleton.java (file contents):
Revision 1.2 by tdb, Fri Mar 23 00:05:23 2001 UTC vs.
Revision 1.3 by ajm, Fri Mar 23 01:09:16 2001 UTC

# Line 11 | Line 11 | import java.util.*;
11  
12   /**
13   * Skeleton class for Alerters
14 + * This skeleton reads alerts from the alert queue designated
15 + * to the Alerter, it then feeds the alerts to the sendAlert
16 + * method, which the extending class should implement.  The class
17 + * should then handle sending the message.  This class also has a
18 + * method to allow formatting of messages.
19   *
20   * @author  $Author$
21   * @version $Id$
# Line 19 | Line 24 | public abstract class AlerterSkeleton extends Thread i
24  
25   //---FINAL ATTRIBUTES---
26  
27 +    /**
28 +     * The current CVS revision of this class
29 +     */
30 +    public final String REVISION = "$Revision$";
31 +
32 +    /**
33 +     * The default level to send alerts at
34 +     */
35      public final String DEFAULT_LEVEL = Alert.alertLevels[0];
36      
37 +    /**
38 +     * If a configuration property is not
39 +     * configured, this will be used instead.
40 +     */
41 +    public final String NOT_CONFIGURED = "<NOT CONFIGURED>";
42 +    
43   //---STATIC METHODS---
44  
45   //---CONSTRUCTORS---
46  
47 +    /**
48 +     * Constructs and starts the alerter reading alerts
49 +     */
50      public AlerterSkeleton() {
51          _logger.write(toString(), Logger.SYSINIT, "started.");
52          this.start();
# Line 91 | Line 113 | public abstract class AlerterSkeleton extends Thread i
113      }
114      
115      /**
116 <     * return the String representation of what the monitor does
116 >     * Return the String representation of what the alerter does
117 >     *
118 >     * @return the description
119       */
120      public abstract String getDescription();
121  
# Line 135 | Line 159 | public abstract class AlerterSkeleton extends Thread i
159       */
160      protected String _name = "AlerterSkeleton";
161  
162 +    /**
163 +     * This holds a reference to the
164 +     * system logger that is being used.
165 +     */
166      protected Logger _logger = ReferenceManager.getInstance().getLogger();
167      
168 +    /**
169 +     * A reference to the singleton configuration proxy
170 +     * in use, through which alerter configuration can be obtained
171 +     */
172      protected ConfigurationProxy _cp = ConfigurationProxy.getInstance();
173  
174 +    /**
175 +     * A reference to the LocalClient alerter queue, into which
176 +     * all new alerts will be placed.
177 +     */
178      protected Queue _alerterQueue = ClientMain._alerterQueue;
179      
180 +    /**
181 +     * The ID of the queue the alerter will use.
182 +     * Initially -1, but initialised on first use.
183 +     */
184      protected int _qID = -1;
185      
186 +    /**
187 +     * The state of the alerter thread
188 +     */
189      protected boolean _running = true;
190  
191   //---STATIC ATTRIBUTES---

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines