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 |
|
*/ |
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 |
|
} |
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"); |