ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/filter/plugins/IMAP__ServiceCheck.java
Revision: 1.3
Committed: Wed Mar 7 23:19:16 2001 UTC (23 years, 2 months ago) by tdb
Branch: MAIN
Changes since 1.2: +5 -33 lines
Log Message:
Made an abstract skeleton class for the service checks. They all do very similar
things, so it seemed worth putting all the behaviour in one place. This also has
another advantage, namely that service checks are now much quicker to produce,
and that in the future the checks could even be moved to a general checker that
reads from the configuration.

File Contents

# User Rev Content
1 tdb 1.1 //---PACKAGE DECLARATION---
2     package uk.ac.ukc.iscream.filter.plugins;
3    
4     //---IMPORTS---
5 tdb 1.3 import uk.ac.ukc.iscream.filter.ServiceCheckSkeleton;
6 tdb 1.1 import java.net.*;
7     import java.io.*;
8    
9     /**
10     * A quick IMAP service checker.
11     *
12 tdb 1.2 * @author $Author: tdb1 $
13 tdb 1.3 * @version $Id: IMAP__ServiceCheck.java,v 1.2 2001/03/07 13:26:38 tdb1 Exp $
14 tdb 1.1 */
15 tdb 1.3 public class IMAP__ServiceCheck extends ServiceCheckSkeleton {
16 tdb 1.1
17     //---FINAL ATTRIBUTES---
18    
19     /**
20     * The current CVS revision of this class
21     */
22 tdb 1.3 public final String REVISION = "$Revision: 1.2 $";
23 tdb 1.1
24     public final String DESC = "Checks that an IMAP server is alive.";
25    
26     //---STATIC METHODS---
27    
28     //---CONSTRUCTORS---
29    
30     //---PUBLIC METHODS---
31    
32     /**
33     * Performs the service check on a given host.
34     *
35     * @param hostname the host to check
36     * @return XML data representing the result of the test
37     */
38     public String runServiceCheck(String hostname){
39 tdb 1.3 return checkService(hostname, 143, "* OK", "IMAP");
40 tdb 1.1 }
41    
42     //---PRIVATE METHODS---
43    
44     //---ACCESSOR/MUTATOR METHODS---
45    
46     //---ATTRIBUTES---
47    
48     //---STATIC ATTRIBUTES---
49    
50     }