KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > rift > coad > daemon > messageservice > MessageError


1 /*
2  * MessageQueueClient: The message queue client library
3  * Copyright (C) 2007 Rift IT Contracting
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * MessageError.java
20  */

21
22 // package path
23
package com.rift.coad.daemon.messageservice;
24
25 // java imports
26
import java.util.Date JavaDoc;
27 import java.io.Serializable JavaDoc;
28
29 /**
30  * This object describes a message error.
31  *
32  * @author Brett Chaldecott
33  */

34 public class MessageError implements Serializable JavaDoc {
35     
36     // private member variables
37
private Date JavaDoc errorDate = null;
38     private int level = 0;
39     private String JavaDoc msg = null;
40     
41     /**
42      * Creates a new instance of MessageError
43      *
44      * @param errorDate The date the error occurred.
45      * @param level The level of the error message.
46      * @param msg The message content for the error.
47      */

48     public MessageError(Date JavaDoc errorDate, int level, String JavaDoc msg) {
49         this.errorDate = errorDate;
50         this.level = level;
51         this.msg = msg;
52     }
53     
54     
55     /**
56      * This method returns the error date.
57      *
58      * @return The error date object.
59      */

60     public Date JavaDoc getErrorDate() {
61         return errorDate;
62     }
63     
64     
65     /**
66      * This method returns the error level.
67      *
68      * @return An int containing the error level.
69      */

70     public int getLevel() {
71         return level;
72     }
73     
74     
75     /**
76      * This method returns the errorr message.
77      *
78      * @return The string containing the error message.
79      */

80     public String JavaDoc getMSG() {
81         return msg;
82     }
83 }
84
Popular Tags