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