|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| URLEvent.java | - | 100% | 100% | 100% |
|
||||||||||||||
| 1 | /* | |
| 2 | * $Id: URLEvent.java,v 1.1 2004/03/17 21:18:02 johndavidtaylor Exp $ Created on Feb 19, 2004 by John Taylor jdt@roe.ac.uk . | |
| 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 | 6 | public String toString() { |
| 42 | 6 | return description; |
| 43 | } | |
| 44 | /** | |
| 45 | * Constructor | |
| 46 | * | |
| 47 | * @param description | |
| 48 | * of event | |
| 49 | */ | |
| 50 | 15 | private URLEvent(final String description) { |
| 51 | 15 | this.description = description; |
| 52 | } | |
| 53 | } | |
| 54 | /* | |
| 55 | * $Log: URLEvent.java,v $ | |
| 56 | * Revision 1.1 2004/03/17 21:18:02 johndavidtaylor | |
| 57 | * Copied across from incubation in beanpeeler | |
| 58 | * | |
| 59 | * Revision 1.4 2004/03/14 18:49:14 johndavidtaylor | |
| 60 | * corrected comments | |
| 61 | * | |
| 62 | * Revision 1.3 2004/03/11 15:46:35 johndavidtaylor | |
| 63 | * Applied coding standards | |
| 64 | * | |
| 65 | * Revision 1.2 2004/03/08 20:16:45 johndavidtaylor | |
| 66 | * refactored to new package name | |
| 67 | * | |
| 68 | * Revision 1.1 2004/03/08 19:58:25 johndavidtaylor | |
| 69 | * Initial commit -transfer from previous repository | |
| 70 | * | |
| 71 | * Revision 1.1 2004/03/02 23:04:37 jdt | |
| 72 | * new | |
| 73 | * | |
| 74 | */ |
|
||||||||||