|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.iscream.cms.server.filter.PluginServiceCheckManager
This class setups up and manages Plugins for performing service checks. When asked to run some service checks it runs the checks on the service check pipeline for that host. If the pipleline does not exist it creates a new one. This is a singleton class. ### This does not fully manage the pipelines, it should check if a host has not heartbeated for a while and thus remove the pipeline. At the moment it does not. A suggestions for doing this is to use the getCreated() method on the PluginServiceCheckPipeline. This tells you when according to the system time the pipeline was created. You could then have a thread that periodically checks to see if a host has not run its pipeline in say two heartbeats, and thus this indicates that it is no longer running. The pipeline could then be removed from the hashmap and thus be eligable for gc. ###
Field Summary | |
private HashMap |
_hostPipelines
A hash map containing host pipelines |
private static PluginServiceCheckManager |
_instance
A reference to the single instance of this class |
private HashMap |
_loadedServiceChecks
A hash map containing host pipelines |
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 service check classes: |
String |
REVISION
The current CVS revision of this class |
Constructor Summary | |
private |
PluginServiceCheckManager()
Private Constructor - this part creates the filter pipeline This is a singleton class, btw. |
Method Summary | |
static PluginServiceCheckManager |
getInstance()
Return a reference to the singleton class. |
PluginServiceCheck |
getServiceCheck(String className)
Returns a reference to the specified service check. |
String |
runServiceChecks(String hostname)
run all registered service checks on a given host, returning XML data with information about the check. |
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 |
public final String REVISION
private final String _suffix
private HashMap _hostPipelines
private HashMap _loadedServiceChecks
private String _name
private Logger _logger
private ReferenceManager _refman
private static PluginServiceCheckManager _instance
Constructor Detail |
private PluginServiceCheckManager()
Method Detail |
public static PluginServiceCheckManager getInstance()
public String runServiceChecks(String hostname)
hostname
- the host to run service checks for
public String toString()
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()
toString
in class Object
public PluginServiceCheck getServiceCheck(String className)
className
- the PluginServiceCheck to be loaded
|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |