View Javadoc

1   package net.sourceforge.argval.message.impl;
2   
3   import java.util.Date;
4   
5   import net.sourceforge.argval.message.MessageItem;
6   import net.sourceforge.argval.message.MessageStoreVisitor;
7   import net.sourceforge.argval.message.MessageStoreVisitorAccepter;
8   
9   public class MessageItemImpl implements MessageItem, MessageStoreVisitorAccepter {
10      private Date date;
11      private String priority;
12      private String message;
13      private Throwable cause;
14      
15      
16      public MessageItemImpl(String priority, String message, Throwable cause) {
17          date = new Date();
18          this.priority = priority;
19          this.message = message;
20          this.cause = cause;
21      }
22      
23      
24      public void accept(MessageStoreVisitor visitor) {
25      	visitor.visit(this);
26  	}
27  
28  
29  	public Date getDate() {
30          return date;
31      }
32  
33  
34      public String getPriority() {
35          return priority;
36      }
37  
38  
39      public String getMessage() {
40          return message;
41      }
42  
43  
44      public Throwable getCause() {
45          return cause;
46      }
47  
48  }