KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jmanage > core > management > ObjectNotification


1 /**
2  * Copyright 2004-2005 jManage.org
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.jmanage.core.management;
17
18 /**
19  * Contains information about the notification sent by the application.
20  *
21  * Date: Jul 1, 2005
22  * @author Rakesh Kalra
23  */

24 public class ObjectNotification {
25
26     /**
27      * The notification type
28      */

29     private String JavaDoc type = null;
30
31     /**
32      * The sequence number of the notification
33      */

34     private long sequenceNumber = 0;
35
36     /**
37      * The message of the notification
38      */

39     private String JavaDoc message = null;
40
41     /**
42      * The time of the notification
43      */

44     private long timeStamp;
45
46     /**
47      * The user data of the notification
48      */

49     private Object JavaDoc userData = null;
50
51     /**
52      * The source of the notification
53      */

54     private Object JavaDoc source = null;
55
56
57     public ObjectNotification(String JavaDoc type,
58                               Object JavaDoc source,
59                               long sequenceNumber,
60                               long timeStamp,
61                               String JavaDoc message,
62                               Object JavaDoc userData) {
63         this.type = type;
64         this.source = source;
65         this.sequenceNumber = sequenceNumber;
66         this.timeStamp = timeStamp;
67         if(message == null || message.length() == 0){
68             this.message = type;
69         }else{
70             this.message = message;
71         }
72
73         this.userData = userData;
74     }
75
76     public String JavaDoc getType() {
77         return type;
78     }
79
80     public long getSequenceNumber() {
81         return sequenceNumber;
82     }
83
84     public String JavaDoc getMessage() {
85         return message;
86     }
87
88     public long getTimeStamp() {
89         return timeStamp;
90     }
91
92     public Object JavaDoc getUserData() {
93         return userData;
94     }
95
96     public Object JavaDoc getMySource() {
97         return source;
98     }
99 }
100
Popular Tags