aboutsummaryrefslogtreecommitdiff
path: root/juick-common/src/main/java/com/juick/server/component
diff options
context:
space:
mode:
Diffstat (limited to 'juick-common/src/main/java/com/juick/server/component')
-rw-r--r--juick-common/src/main/java/com/juick/server/component/MessageReadEvent.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/juick-common/src/main/java/com/juick/server/component/MessageReadEvent.java b/juick-common/src/main/java/com/juick/server/component/MessageReadEvent.java
new file mode 100644
index 00000000..e75d3636
--- /dev/null
+++ b/juick-common/src/main/java/com/juick/server/component/MessageReadEvent.java
@@ -0,0 +1,28 @@
+package com.juick.server.component;
+
+import com.juick.Message;
+import com.juick.User;
+import org.springframework.context.ApplicationEvent;
+
+public class MessageReadEvent extends ApplicationEvent {
+ private User user;
+ private Message message;
+ /**
+ * Create a new ApplicationEvent.
+ *
+ * @param source the object on which the event initially occurred (never {@code null})
+ */
+ public MessageReadEvent(Object source, User user, Message message) {
+ super(source);
+ this.user = user;
+ this.message = message;
+ }
+
+ public User getUser() {
+ return user;
+ }
+
+ public Message getMessage() {
+ return message;
+ }
+}