01: /*
02: * MessageQueueClient: The message queue client library
03: * Copyright (C) 2007 Rift IT Contracting
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation; either
08: * version 2.1 of the License, or (at your option) any later version.
09: *
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;
27: import java.io.Serializable;
28:
29: /**
30: * This object describes a message error.
31: *
32: * @author Brett Chaldecott
33: */
34: public class MessageError implements Serializable {
35:
36: // private member variables
37: private Date errorDate = null;
38: private int level = 0;
39: private String 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 errorDate, int level, String msg) {
49: this .errorDate = errorDate;
50: this .level = level;
51: this .msg = msg;
52: }
53:
54: /**
55: * This method returns the error date.
56: *
57: * @return The error date object.
58: */
59: public Date getErrorDate() {
60: return errorDate;
61: }
62:
63: /**
64: * This method returns the error level.
65: *
66: * @return An int containing the error level.
67: */
68: public int getLevel() {
69: return level;
70: }
71:
72: /**
73: * This method returns the errorr message.
74: *
75: * @return The string containing the error message.
76: */
77: public String getMSG() {
78: return msg;
79: }
80: }
|