uk.org.iscream.cms.server.client
Class AlerterManager

java.lang.Object
  extended byjava.lang.Thread
      extended byuk.org.iscream.cms.server.client.AlerterManager
All Implemented Interfaces:
Runnable

public class AlerterManager
extends Thread

A manager for the Alerters. This class starts by loading all the alerters as specificed in the configuration. These alerters should implement the PluginAlerter interface. This class is then simply a reference point for the Alerters to get hooks on the various parts of the system that they require.

Version:
$Id: AlerterManager.java,v 1.13 2004/08/01 10:40:40 tdb Exp $
Author:
$Author: tdb $

Field Summary
private  LinkedList _alerterPipeline
          LinkedList for holding the PluginAlerter objects (the pipeline).
private static AlerterManager _instance
          A reference to the single instance of this class
private  Logger _logger
          This holds a reference to the system logger that is being used.
private  String _name
          This is the friendly identifier of the component this class is running in.
private  ReferenceManager _refman
          A reference to the reference manager in use
private  String _suffix
          file name suffix for plugin alerter classes:
static String REVISION
          The current CVS revision of this class
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
private AlerterManager()
          Constructs a new AlerterManager.
 
Method Summary
static AlerterManager getInstance()
          Return a reference to the single class.
 Queue getQueue()
          Allows alerters to obtain a reference to the alerting queue so that they can process any alerts
 String toString()
          Overrides the Object.toString() method to provide clean logging (every class should have this).
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
The current CVS revision of this class

See Also:
Constant Field Values

_name

private String _name
This is the friendly identifier of the component this class is running in. eg, a Filter may be called "filter1", If this class does not have an owning component, a name from the configuration can be placed here. This name could also be changed to null for utility classes.


_logger

private Logger _logger
This holds a reference to the system logger that is being used.


_refman

private ReferenceManager _refman
A reference to the reference manager in use


_suffix

private final String _suffix
file name suffix for plugin alerter classes:

See Also:
Constant Field Values

_alerterPipeline

private LinkedList _alerterPipeline
LinkedList for holding the PluginAlerter objects (the pipeline).


_instance

private static AlerterManager _instance
A reference to the single instance of this class

Constructor Detail

AlerterManager

private AlerterManager()
Constructs a new AlerterManager. This initialises all the queues and loads all the Alerters that have been specified in the configuration

Method Detail

getInstance

public static AlerterManager getInstance()
Return a reference to the single class. Construct it if it does not already exist, otherwise just return the reference.


toString

public String toString()
Overrides the Object.toString() method to provide clean logging (every class should have this). This uses the uk.org.iscream.cms.util.FormatName class to format the toString()

Returns:
the name of this class and its CVS revision

getQueue

public Queue getQueue()
Allows alerters to obtain a reference to the alerting queue so that they can process any alerts

Returns:
a reference to the alert queue


Copyright © 2000-2003 i-scream. All Rights Reserved.