1 |
tdb |
1.7 |
/* |
2 |
|
|
* i-scream central monitoring system |
3 |
|
|
* Copyright (C) 2000-2002 i-scream |
4 |
|
|
* |
5 |
|
|
* This program is free software; you can redistribute it and/or |
6 |
|
|
* modify it under the terms of the GNU General Public License |
7 |
|
|
* as published by the Free Software Foundation; either version 2 |
8 |
|
|
* of the License, or (at your option) any later version. |
9 |
|
|
* |
10 |
|
|
* This program is distributed in the hope that it will be useful, |
11 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
|
|
* GNU General Public License for more details. |
14 |
|
|
* |
15 |
|
|
* You should have received a copy of the GNU General Public License |
16 |
|
|
* along with this program; if not, write to the Free Software |
17 |
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 |
|
|
*/ |
19 |
|
|
|
20 |
tdb |
1.1 |
//---PACKAGE DECLARATION--- |
21 |
tdb |
1.6 |
package uk.org.iscream.cms.server.filter.plugins; |
22 |
tdb |
1.1 |
|
23 |
|
|
//---IMPORTS--- |
24 |
tdb |
1.6 |
import uk.org.iscream.cms.server.filter.ServiceCheckSkeleton; |
25 |
tdb |
1.1 |
import java.net.*; |
26 |
|
|
import java.io.*; |
27 |
|
|
|
28 |
|
|
/** |
29 |
|
|
* A quick FTP service checker. |
30 |
|
|
* |
31 |
tdb |
1.7 |
* @author $Author: tdb $ |
32 |
|
|
* @version $Id: FTP__ServiceCheck.java,v 1.6 2001/05/29 17:02:35 tdb Exp $ |
33 |
tdb |
1.1 |
*/ |
34 |
tdb |
1.3 |
public class FTP__ServiceCheck extends ServiceCheckSkeleton { |
35 |
tdb |
1.1 |
|
36 |
|
|
//---FINAL ATTRIBUTES--- |
37 |
|
|
|
38 |
|
|
/** |
39 |
|
|
* The current CVS revision of this class |
40 |
|
|
*/ |
41 |
tdb |
1.7 |
public final String REVISION = "$Revision: 1.6 $"; |
42 |
tdb |
1.1 |
|
43 |
|
|
public final String DESC = "Checks that an FTP server is alive."; |
44 |
|
|
|
45 |
|
|
//---STATIC METHODS--- |
46 |
|
|
|
47 |
|
|
//---CONSTRUCTORS--- |
48 |
|
|
|
49 |
|
|
//---PUBLIC METHODS--- |
50 |
|
|
|
51 |
|
|
/** |
52 |
|
|
* Performs the service check on a given host. |
53 |
|
|
* |
54 |
|
|
* @param hostname the host to check |
55 |
|
|
* @return XML data representing the result of the test |
56 |
|
|
*/ |
57 |
|
|
public String runServiceCheck(String hostname){ |
58 |
tdb |
1.3 |
return checkService(hostname, 21, "220", "FTP"); |
59 |
tdb |
1.4 |
} |
60 |
|
|
|
61 |
|
|
/** |
62 |
|
|
* return the String representation of what the filter does |
63 |
|
|
*/ |
64 |
|
|
public String getDescription(){ |
65 |
|
|
return DESC; |
66 |
tdb |
1.1 |
} |
67 |
|
|
|
68 |
|
|
//---PRIVATE METHODS--- |
69 |
|
|
|
70 |
|
|
//---ACCESSOR/MUTATOR METHODS--- |
71 |
|
|
|
72 |
|
|
//---ATTRIBUTES--- |
73 |
|
|
|
74 |
|
|
//---STATIC ATTRIBUTES--- |
75 |
|
|
|
76 |
|
|
} |