ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/client/Alert.java
Revision: 1.2
Committed: Wed Feb 28 00:07:58 2001 UTC (23 years, 2 months ago) by tdb
Branch: MAIN
Changes since 1.1: +10 -3 lines
Log Message:
I don't think I paid attention when I committed that. Anyway, this is just a
start of an Alert packet. It is used by the local client to pass Alert's around.

File Contents

# Content
1 //---PACKAGE DECLARATION---
2 package uk.ac.ukc.iscream.client;
3
4 //---IMPORTS---
5 import uk.ac.ukc.iscream.util.*;
6
7 /**
8 * Alert Object
9 *
10 * @author $Author: tdb1 $
11 * @version $Id: Alert.java,v 1.1 2001/02/28 00:00:04 tdb1 Exp $
12 */
13 class Alert {
14
15 //---FINAL ATTRIBUTES---
16
17 /**
18 * The current CVS revision of this class
19 */
20 public static final String REVISION = "$Revision: 1.1 $";
21
22 // DEFINE MORE ALERT LEVELS HERE
23 public static final int OK = 0;
24
25 //---STATIC METHODS---
26
27 //---CONSTRUCTORS---
28
29 /**
30 * Construct an Alert packet at a set level.
31 *
32 * @param level the level of the alert
33 */
34 public Alert(int level) {
35 _level = level;
36 }
37
38 //---PUBLIC METHODS---
39
40 /**
41 * Overrides the {@link java.lang.Object#toString() Object.toString()}
42 * method to provide clean logging (every class should have this).
43 *
44 * This uses the uk.ac.ukc.iscream.util.FormatName class
45 * to format the toString()
46 *
47 * @return the name of this class and its CVS revision
48 */
49 public String toString() {
50 return FormatName.getName(
51 _name,
52 getClass().getName(),
53 REVISION);
54 }
55
56 //---PRIVATE METHODS---
57
58 //---ACCESSOR/MUTATOR METHODS---
59
60 /**
61 * Returns the level of this packet
62 */
63 public int getLevel() {
64 return _level;
65 }
66
67 //---ATTRIBUTES---
68
69 /**
70 * This is the friendly identifier of the
71 * component this class is running in.
72 * eg, a Filter may be called "filter1",
73 * If this class does not have an owning
74 * component, a name from the configuration
75 * can be placed here. This name could also
76 * be changed to null for utility classes.
77 */
78 private String _name = ClientMain.NAME;
79
80 /**
81 * The alert level of this packet
82 */
83 private int _level;
84
85 //---STATIC ATTRIBUTES---
86
87 }