1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.jdiagnose.runtime;
17
18 import java.util.Collections;
19 import java.util.List;
20
21 import org.jdiagnose.DiagnosticMessage;
22 import org.jdiagnose.ResultInfo;
23
24 /***
25 * User: jamie
26 * Date: May 30, 2004
27 * Time: 7:42:52 PM
28 */
29 public class LightWeightResult implements ResultInfo {
30
31 private ResultState state;
32 private long startTime;
33 private long finishTime;
34 private DiagnosticMessage message;
35 private String name;
36
37 public LightWeightResult(DiagnosticResult result) {
38 this.state = result.getState();
39 this.startTime = result.getStartTime();
40 this.finishTime = result.getFinishTime();
41 this.message = result.getMessage();
42 this.name = result.getName();
43 }
44
45 public List getResults() {
46 return Collections.EMPTY_LIST;
47 }
48
49 public ResultState getState() {
50 return state;
51 }
52
53 public long getDuration() {
54 return finishTime - startTime;
55 }
56
57 public long getFinishTime() {
58 return finishTime;
59 }
60
61 public long getStartTime() {
62 return startTime;
63 }
64
65 public String getName() {
66 return name;
67 }
68
69
70 public DiagnosticMessage getMessage() {
71 return message;
72 }
73 }