uk.org.iscream.cms.server.filter
Class PluginServiceCheckPipeline

java.lang.Object
  extended byuk.org.iscream.cms.server.filter.PluginServiceCheckPipeline

class PluginServiceCheckPipeline
extends Object

This class setups up and manages Plugins for performing service checks. A list of plugins to use is specified in the configuration, and these are all loaded for a specific host when asked. It asks the configuration manager for references to ServiceChecks to perform, thus ensuring only one instance of a service check is loaded for all hosts.

Version:
$Id: PluginServiceCheckPipeline.java,v 1.11 2004/08/01 10:40:59 tdb Exp $
Author:
$Author: tdb $

Field Summary
private  long _created
          When this pipleine was created
private  String _fileList
          The list of files used in the configuration
private  String _hostname
          The name of the host this pipleline is for
private  long _lastModified
          When the current pipeline configuration was last modified
private  Logger _logger
          This holds a reference to the system logger that is being used.
private  PluginServiceCheckManager _manager
          The plugin manager from which we can obtain references to service checks
private  String _name
          This is the friendly identifier of the component this class is running in.
private  LinkedList _pipeline
          Holds the current pipeline of plugins
private  ReferenceManager _refman
          A reference to the reference manager in use
private  String _suffix
          file name suffix for plugin classes:
 String REVISION
          The current CVS revision of this class
 
Constructor Summary
PluginServiceCheckPipeline(String hostname, PluginServiceCheckManager manager)
          Creates a new pipeline
 
Method Summary
private  LinkedList buildPipeline()
          Builds a pipeline of service checks to be run.
 long getCreated()
          Returns the system time that this instance was created at.
 String runPipeline()
          Instructs this pipeline to execute
 String toString()
          Overrides the Object.toString() method to provide clean logging (every class should have this).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REVISION

public final String REVISION
The current CVS revision of this class

See Also:
Constant Field Values

_suffix

private final String _suffix
file name suffix for plugin classes:

See Also:
Constant Field Values

_hostname

private String _hostname
The name of the host this pipleline is for


_pipeline

private LinkedList _pipeline
Holds the current pipeline of plugins


_created

private long _created
When this pipleine was created


_lastModified

private long _lastModified
When the current pipeline configuration was last modified


_fileList

private String _fileList
The list of files used in the configuration


_manager

private PluginServiceCheckManager _manager
The plugin manager from which we can obtain references to service checks


_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

Constructor Detail

PluginServiceCheckPipeline

public PluginServiceCheckPipeline(String hostname,
                                  PluginServiceCheckManager manager)
Creates a new pipeline

Parameters:
hostname - the host this pipeline is for
manager - the manager to obtain services checks from
Method Detail

runPipeline

public String runPipeline()
Instructs this pipeline to execute

Returns:
the XML generated by all the service checks

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.NameFormat class to format the toString()

Returns:
the name of this class and its CVS revision

buildPipeline

private LinkedList buildPipeline()
Builds a pipeline of service checks to be run. This method is called to read in the service checks for a particular host from the configurations. It then builds a linked list of theses checks and then returns them.

Returns:
the pipeline

getCreated

public long getCreated()
Returns the system time that this instance was created at. Used for management of pipelines to determine when its use is finished.

Returns:
the time of creation


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