1 package org.csc.phynixx.watchdog.log;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 import org.csc.phynixx.watchdog.IWatchedCondition;
25
26
27
28
29
30 public class ConditionViolatedLog implements IWatchdogLog {
31
32 private long timestamp = 0l;
33 private String condition = null;
34 private String description = null;
35
36 public ConditionViolatedLog(IWatchedCondition condition) {
37 super();
38 this.timestamp = System.currentTimeMillis();
39 this.condition = condition.toString();
40
41 this.description = this.condition;
42 }
43
44 public ConditionViolatedLog(IWatchedCondition condition, String description) {
45 super();
46 this.timestamp = System.currentTimeMillis();
47 this.condition = condition.toString();
48 this.description = this.condition + " " + description;
49 }
50
51 public long getTimestamp() {
52 return timestamp;
53 }
54
55 public String getCondition() {
56 return condition;
57 }
58
59 public String getDescription() {
60 return this.description;
61 }
62
63 public String toString() {
64 return "ConditionViolated : " + this.getDescription();
65 }
66
67
68 }