1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package com.ebay.carad.os.vitalsigns.dataretrievers;
22
23 /***
24 * <p>Interface for any sort of logging functionality. It simply is invoked
25 * through .test() and returns a float value, which is intended to be logged
26 * somewhere.</p>
27 *
28 * <p>Very useful for tests such as web tests logging overall time taken
29 * to perform entire test, etc...</p>
30 *
31 * @author Jeremy Kraybill
32 * @author Jeremy Thomerson
33 * @version $Id$
34 */
35 public interface ITester extends Cloneable {
36
37 public static final ITester NO_OP_TESTER = new ITester() {
38 public Object clone() throws CloneNotSupportedException {
39 return NO_OP_TESTER;
40 }
41 public float test() {
42 return 0;
43 }
44 };
45
46 /***
47 * Executes the test. If the test fails, the tester should throw a
48 * <code>ReportingException</code> rather than an <code>Error</code>.
49 *
50 * @return the time in seconds to execute the test (if it ran successfully), or
51 * whatever other data this tester logs.
52 */
53 public float test();
54
55 public Object clone() throws CloneNotSupportedException;
56
57 }