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

Comparing projects/cms/source/server/uk/org/iscream/cms/server/client/AlerterManager.java (file contents):
Revision 1.5 by ajm, Thu Mar 22 22:07:14 2001 UTC vs.
Revision 1.9 by tdb, Tue May 29 17:02:34 2001 UTC

# Line 1 | Line 1
1   //---PACKAGE DECLARATION---
2 < package uk.org.iscream.client;
2 > package uk.org.iscream.cms.server.client;
3  
4   //---IMPORTS---
5 < import uk.org.iscream.componentmanager.*;
6 < import uk.org.iscream.core.*;
7 < import uk.org.iscream.util.*;
5 > import uk.org.iscream.cms.server.componentmanager.*;
6 > import uk.org.iscream.cms.server.core.*;
7 > import uk.org.iscream.cms.server.util.*;
8   import java.util.*;
9  
10   /**
11   * A manager for the Alerters.
12   *
13 + * This class starts by loading all the alerters as specificed in the configuration.
14 + * These alerters should implement the PluginAlerter interface.
15 + *
16 + * This class is then simply a reference point for the Alerters to get hooks on
17 + * the various parts of the system that they require.
18 + *
19   * @author  $Author$
20   * @version $Id$
21   */
# Line 28 | Line 34 | public class AlerterManager extends Thread {
34       * Return a reference to the single class.
35       * Construct it if it does not already exist, otherwise just return the reference.
36       */
37 <    public static AlerterManager getInstance() {
37 >    public synchronized static AlerterManager getInstance() {
38          if (_instance == null){
39              _instance = new AlerterManager();
40          }
# Line 36 | Line 42 | public class AlerterManager extends Thread {
42      }
43  
44   //---CONSTRUCTORS---
45 <
45 >    
46 >    /**
47 >     * Constructs a new AlerterManager.
48 >     * This initialises all the queues and loads
49 >     * all the Alerters that have been specified in the configuration
50 >     */
51      private AlerterManager() {
52          // set our name
53          setName("client.AlerterManager");
54          
44        _queue = ClientMain._alerterQueue;
45        _qID = _queue.getQueue();
55          _logger.write(toString(), Logger.SYSINIT, "Initialising");
56          _logger.write(toString(), Logger.SYSMSG, "Creating alerter pipeline for plugin alerters ...");
57          
# Line 92 | Line 101 | public class AlerterManager extends Thread {
101       * Overrides the {@link java.lang.Object#toString() Object.toString()}
102       * method to provide clean logging (every class should have this).
103       *
104 <     * This uses the uk.org.iscream.util.FormatName class
104 >     * This uses the uk.org.iscream.cms.server.util.FormatName class
105       * to format the toString()
106       *
107       * @return the name of this class and its CVS revision
# Line 116 | Line 125 | public class AlerterManager extends Thread {
125       * @return a reference to the alert queue
126       */
127      public Queue getQueue() {
128 <        return _queue;
128 >        return ClientMain._alerterQueue;
129      }
130  
131   //---ATTRIBUTES---
# Line 142 | Line 151 | public class AlerterManager extends Thread {
151       * A reference to the reference manager in use
152       */
153      private ReferenceManager _refman = ReferenceManager.getInstance();
145    
146    /**
147     * A reference to our Queue
148     */
149    private Queue _queue;
150    
151    /**
152     * Our queue ID
153     */
154    private int _qID;
154      
155      /**
156       * file name suffix for plugin alerter classes:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines