17 |
|
* @author $Author$ |
18 |
|
* @version $Id$ |
19 |
|
*/ |
20 |
< |
public class EMail__Alerter implements PluginAlerter { |
20 |
> |
public class EMail__Alerter extends Thread implements PluginAlerter { |
21 |
|
|
22 |
|
//---FINAL ATTRIBUTES--- |
23 |
|
|
38 |
|
|
39 |
|
public EMail__Alerter() { |
40 |
|
_logger.write(toString(), Logger.SYSINIT, "IRC Alerter started"); |
41 |
+ |
this.start(); |
42 |
|
} |
43 |
|
|
44 |
|
//---PUBLIC METHODS--- |
157 |
|
|
158 |
|
//---ACCESSOR/MUTATOR METHODS--- |
159 |
|
|
160 |
+ |
protected Queue getQueue() { |
161 |
+ |
return AlerterManager.getInstance().getQueue(); |
162 |
+ |
} |
163 |
+ |
|
164 |
+ |
protected int getQueueId() { |
165 |
+ |
if (_qID == -1) { |
166 |
+ |
_qID = getQueue().getQueue(); |
167 |
+ |
_logger.write(toString(), Logger.DEBUG, "Assigned Queue - " + _qID); |
168 |
+ |
} |
169 |
+ |
return _qID; |
170 |
+ |
} |
171 |
+ |
|
172 |
|
//---ATTRIBUTES--- |
173 |
|
|
174 |
|
/** |
187 |
|
* system logger that is being used. |
188 |
|
*/ |
189 |
|
private Logger _logger = ReferenceManager.getInstance().getLogger(); |
190 |
+ |
|
191 |
+ |
/** |
192 |
+ |
* The queue id for this alerters queue in the alert queue |
193 |
+ |
*/ |
194 |
+ |
private int _qID = -1; |
195 |
+ |
|
196 |
+ |
/** |
197 |
+ |
* The running status of the alerter |
198 |
+ |
*/ |
199 |
+ |
private boolean _running = true; |
200 |
|
|
201 |
|
//---STATIC ATTRIBUTES--- |
202 |
|
|