1 |
tdb |
1.1 |
//---PACKAGE DECLARATION--- |
2 |
tdb |
1.4 |
package uk.org.iscream.filter.plugins; |
3 |
tdb |
1.1 |
|
4 |
|
|
//---IMPORTS--- |
5 |
tdb |
1.4 |
import uk.org.iscream.filter.ServiceCheckSkeleton; |
6 |
tdb |
1.1 |
import java.net.*; |
7 |
|
|
import java.io.*; |
8 |
|
|
|
9 |
|
|
/** |
10 |
|
|
* A quick SSH service checker. |
11 |
|
|
* |
12 |
tdb |
1.2 |
* @author $Author: tdb1 $ |
13 |
tdb |
1.4 |
* @version $Id: SSH__ServiceCheck.java,v 1.3 2001/03/08 00:35:02 tdb1 Exp $ |
14 |
tdb |
1.1 |
*/ |
15 |
tdb |
1.3 |
public class SSH__ServiceCheck extends ServiceCheckSkeleton { |
16 |
tdb |
1.1 |
|
17 |
|
|
//---FINAL ATTRIBUTES--- |
18 |
|
|
|
19 |
|
|
/** |
20 |
|
|
* The current CVS revision of this class |
21 |
|
|
*/ |
22 |
tdb |
1.4 |
public final String REVISION = "$Revision: 1.3 $"; |
23 |
tdb |
1.1 |
|
24 |
|
|
public final String DESC = "Checks that an SSH 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, 22, "SSH", "SSH"); |
40 |
tdb |
1.1 |
} |
41 |
|
|
|
42 |
|
|
/** |
43 |
|
|
* return the String representation of what the filter does |
44 |
|
|
*/ |
45 |
|
|
public String getDescription(){ |
46 |
|
|
return DESC; |
47 |
|
|
} |
48 |
|
|
|
49 |
|
|
//---PRIVATE METHODS--- |
50 |
|
|
|
51 |
|
|
//---ACCESSOR/MUTATOR METHODS--- |
52 |
|
|
|
53 |
|
|
//---ATTRIBUTES--- |
54 |
|
|
|
55 |
|
|
//---STATIC ATTRIBUTES--- |
56 |
|
|
|
57 |
|
|
} |