1
2
3
4 package org.abraracourcix.alipes.monitors.url;
5 import org.abraracourcix.alipes.common.Event;
6 /***
7 * An event representing all the things that could go wrong with polling a URL
8 * @author jdt
9 *
10 */
11 public final class URLEvent implements Event {
12 /***
13 * Enum value
14 */
15 public static final URLEvent UNKNOWN = new URLEvent("Unknown");
16 /***
17 * Enum value
18 */
19 public static final URLEvent DOWN = new URLEvent("URL is down");
20 /***
21 * Enum value
22 */
23 public static final URLEvent UP = new URLEvent("URL is up");
24 /***
25 * Enum value
26 */
27 public static final URLEvent GONE_DOWN = new URLEvent("URL has gone down");
28 /***
29 * Enum value
30 */
31 public static final URLEvent GONE_UP = new URLEvent("URL has come up");
32 /***
33 * Text describing the event
34 */
35 private String description;
36 /***
37 * The usual toString method, returning a description of the event
38 *
39 * @return the event
40 */
41 public String toString() {
42 return description;
43 }
44 /***
45 * Constructor
46 *
47 * @param description
48 * of event
49 */
50 private URLEvent(final String description) {
51 this.description = description;
52 }
53 }
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74