1
2
3
4 package org.jdiagnose;
5
6 import org.jdiagnose.runtime.ResultState;
7
8 /***
9 * Information about a particular diagnostic run.
10 *
11 * @author jmccrindle
12 */
13 public interface ResultInfo {
14 /***
15 * @return the name of the diagnostic that was run
16 */
17 String getName();
18
19 /***
20 * @return whether the diagnostic isn't running, has
21 * started/succeeded/failed
22 */
23 ResultState getState();
24
25 /***
26 * @return the length of time the diagnostic took to run in milliseconds
27 */
28 long getDuration();
29
30 /***
31 * @return the exception that caused the diagnostic to fail, if it failed.
32 * may often be null.
33 */
34 DiagnosticMessage getMessage();
35
36 /***
37 * @return the time in milliseconds when the diagnostic started
38 */
39 long getStartTime();
40
41 /***
42 * @return the time in milliseconds when the diagnostic completed
43 */
44 long getFinishTime();
45
46 }