aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/service/component/SystemEvent.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-09-24 11:54:21 +0300
committerGravatar Vitaly Takmazov2019-09-24 11:54:21 +0300
commit2f2e9aab6194037259625200091949d8648e3409 (patch)
tree4669e3bf5389bf68581094ab01dee4155a91e24f /src/main/java/com/juick/service/component/SystemEvent.java
parent289afd5a0b510e4501cf421dd9a05bb53bc424c3 (diff)
Use single event model for all application events
Diffstat (limited to 'src/main/java/com/juick/service/component/SystemEvent.java')
-rw-r--r--src/main/java/com/juick/service/component/SystemEvent.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/main/java/com/juick/service/component/SystemEvent.java b/src/main/java/com/juick/service/component/SystemEvent.java
new file mode 100644
index 00000000..11a10860
--- /dev/null
+++ b/src/main/java/com/juick/service/component/SystemEvent.java
@@ -0,0 +1,26 @@
+package com.juick.service.component;
+
+import com.juick.Message;
+import com.juick.User;
+import com.juick.server.api.SystemActivity;
+import org.springframework.context.ApplicationEvent;
+
+import java.util.List;
+
+public class SystemEvent extends ApplicationEvent {
+ private SystemActivity activity;
+ /**
+ * Create a new ApplicationEvent.
+ *
+ * @param source the object on which the event initially occurred (never {@code null})
+ * @param activity system activity
+ */
+ public SystemEvent(Object source, SystemActivity activity) {
+ super(source);
+ this.activity = activity;
+ }
+
+ public SystemActivity getActivity() {
+ return activity;
+ }
+}