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.4 by tdb, Thu Mar 15 22:12:22 2001 UTC vs.
Revision 1.5 by ajm, Thu Mar 22 22:07:14 2001 UTC

# Line 8 | Line 8 | import uk.org.iscream.util.*;
8   import java.util.*;
9  
10   /**
11 < * A manager for the Monitors.
11 > * A manager for the Alerters.
12   *
13   * @author  $Author$
14   * @version $Id$
15   */
16 < class AlerterManager extends Thread {
16 > public class AlerterManager extends Thread {
17  
18   //---FINAL ATTRIBUTES---
19  
# Line 87 | Line 87 | class AlerterManager extends Thread {
87      }
88  
89   //---PUBLIC METHODS---
90    
91    public void run() {
92        
93        boolean run=true;
94        while(run) {
95            // attempt to get some data from the Queue
96            Alert alert = null;
97            try {
98                alert = (Alert) _queue.get(_qID);
99            }
100            catch(InvalidQueueException e) {
101                _logger.write(toString(), Logger.ERROR, "Queue failure: "+e);
102            }
103            
104            // for each alerter in the pipeline...
105            Iterator pluginAlerters = _alerterPipeline.iterator();
106            while (pluginAlerters.hasNext()){
107                PluginAlerter alerter = (PluginAlerter)pluginAlerters.next();
108                alerter.sendAlert(alert);
109            }
110        }
111    }
90  
91      /**
92       * Overrides the {@link java.lang.Object#toString() Object.toString()}
# Line 129 | Line 107 | class AlerterManager extends Thread {
107   //---PRIVATE METHODS---
108  
109   //---ACCESSOR/MUTATOR METHODS---
110 +
111 +    /**
112 +     * Allows alerters to obtain a reference
113 +     * to the alerting queue so that they can
114 +     * process any alerts
115 +     *
116 +     * @return a reference to the alert queue
117 +     */
118 +    public Queue getQueue() {
119 +        return _queue;
120 +    }
121  
122   //---ATTRIBUTES---
123  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines