aboutsummaryrefslogtreecommitdiff
path: root/juick-common/src/main/java/com/juick/service/component
diff options
context:
space:
mode:
Diffstat (limited to 'juick-common/src/main/java/com/juick/service/component')
-rw-r--r--juick-common/src/main/java/com/juick/service/component/DisconnectedEvent.java14
-rw-r--r--juick-common/src/main/java/com/juick/service/component/LikeEvent.java36
-rw-r--r--juick-common/src/main/java/com/juick/service/component/MessageEvent.java31
-rw-r--r--juick-common/src/main/java/com/juick/service/component/MessageReadEvent.java30
-rw-r--r--juick-common/src/main/java/com/juick/service/component/NotificationListener.java25
-rw-r--r--juick-common/src/main/java/com/juick/service/component/PingEvent.java21
-rw-r--r--juick-common/src/main/java/com/juick/service/component/SubscribeEvent.java27
-rw-r--r--juick-common/src/main/java/com/juick/service/component/TopEvent.java21
-rw-r--r--juick-common/src/main/java/com/juick/service/component/UserUpdatedEvent.java23
9 files changed, 0 insertions, 228 deletions
diff --git a/juick-common/src/main/java/com/juick/service/component/DisconnectedEvent.java b/juick-common/src/main/java/com/juick/service/component/DisconnectedEvent.java
deleted file mode 100644
index 552c3e66..00000000
--- a/juick-common/src/main/java/com/juick/service/component/DisconnectedEvent.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.juick.service.component;
-
-import org.springframework.context.ApplicationEvent;
-
-public class DisconnectedEvent extends ApplicationEvent {
- /**
- * Create a new ApplicationEvent.
- *
- * @param source the object on which the event initially occurred (never {@code null})
- */
- public DisconnectedEvent(Object source) {
- super(source);
- }
-}
diff --git a/juick-common/src/main/java/com/juick/service/component/LikeEvent.java b/juick-common/src/main/java/com/juick/service/component/LikeEvent.java
deleted file mode 100644
index 0d4df70c..00000000
--- a/juick-common/src/main/java/com/juick/service/component/LikeEvent.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.juick.service.component;
-
-import com.juick.Message;
-import com.juick.User;
-import org.springframework.context.ApplicationEvent;
-
-import java.util.List;
-
-public class LikeEvent extends ApplicationEvent {
- private User user;
- private Message message;
- private List<User> subscribers;
- /**
- * Create a new ApplicationEvent.
- *
- * @param source the object on which the event initially occurred (never {@code null})
- */
- public LikeEvent(Object source, User user, Message message, List<User> subscribers) {
- super(source);
- this.message = message;
- this.user = user;
- this.subscribers = subscribers;
- }
-
- public User getUser() {
- return user;
- }
-
- public Message getMessage() {
- return message;
- }
-
- public List<User> getSubscribers() {
- return subscribers;
- }
-}
diff --git a/juick-common/src/main/java/com/juick/service/component/MessageEvent.java b/juick-common/src/main/java/com/juick/service/component/MessageEvent.java
deleted file mode 100644
index 82911a58..00000000
--- a/juick-common/src/main/java/com/juick/service/component/MessageEvent.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.juick.service.component;
-
-import com.juick.Message;
-import com.juick.User;
-import org.springframework.context.ApplicationEvent;
-
-import java.util.List;
-
-public class MessageEvent extends ApplicationEvent {
- private Message message;
- private List<User> users;
- /**
- * Create a new ApplicationEvent.
- *
- * @param source the object on which the event initially occurred (never {@code null})
- * @param message app message
- * @param interestedUsers users interested in notification
- */
- public MessageEvent(Object source, Message message, List<User> interestedUsers) {
- super(source);
- this.message = message;
- this.users = interestedUsers;
- }
-
- public Message getMessage() {
- return message;
- }
- public List<User> getUsers() {
- return users;
- }
-}
diff --git a/juick-common/src/main/java/com/juick/service/component/MessageReadEvent.java b/juick-common/src/main/java/com/juick/service/component/MessageReadEvent.java
deleted file mode 100644
index b070c8cb..00000000
--- a/juick-common/src/main/java/com/juick/service/component/MessageReadEvent.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.juick.service.component;
-
-import com.juick.Message;
-import com.juick.User;
-import org.springframework.context.ApplicationEvent;
-
-import java.util.List;
-
-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;
- }
-}
diff --git a/juick-common/src/main/java/com/juick/service/component/NotificationListener.java b/juick-common/src/main/java/com/juick/service/component/NotificationListener.java
deleted file mode 100644
index 38d0490a..00000000
--- a/juick-common/src/main/java/com/juick/service/component/NotificationListener.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.juick.service.component;
-
-import org.springframework.context.event.EventListener;
-import org.springframework.scheduling.annotation.Async;
-
-public interface NotificationListener {
- @Async
- @EventListener
- void processMessageEvent(MessageEvent messageEvent);
- @Async
- @EventListener
- void processSubscribeEvent(SubscribeEvent subscribeEvent);
- @Async
- @EventListener
- void processLikeEvent(LikeEvent likeEvent);
- @Async
- @EventListener
- void processPingEvent(PingEvent pingEvent);
- @Async
- @EventListener
- void processMessageReadEvent(MessageReadEvent messageReadEvent);
- @Async
- @EventListener
- void processTopEvent(TopEvent topEvent);
-}
diff --git a/juick-common/src/main/java/com/juick/service/component/PingEvent.java b/juick-common/src/main/java/com/juick/service/component/PingEvent.java
deleted file mode 100644
index 8e3f3fa7..00000000
--- a/juick-common/src/main/java/com/juick/service/component/PingEvent.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.juick.service.component;
-
-import com.juick.User;
-import org.springframework.context.ApplicationEvent;
-
-public class PingEvent extends ApplicationEvent {
- private User pinger;
- /**
- * Create a new ApplicationEvent.
- *
- * @param source the object on which the event initially occurred (never {@code null})
- */
- public PingEvent(Object source, User pinger) {
- super(source);
- this.pinger = pinger;
- }
-
- public User getPinger() {
- return pinger;
- }
-}
diff --git a/juick-common/src/main/java/com/juick/service/component/SubscribeEvent.java b/juick-common/src/main/java/com/juick/service/component/SubscribeEvent.java
deleted file mode 100644
index 9b644f2f..00000000
--- a/juick-common/src/main/java/com/juick/service/component/SubscribeEvent.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.juick.service.component;
-
-import com.juick.User;
-import org.springframework.context.ApplicationEvent;
-
-public class SubscribeEvent extends ApplicationEvent {
- private User user;
- private User toUser;
- /**
- * Create a new ApplicationEvent.
- *
- * @param source the object on which the event initially occurred (never {@code null})
- */
- public SubscribeEvent(Object source, User user, User toUser) {
- super(source);
- this.user = user;
- this.toUser = toUser;
- }
-
- public User getUser() {
- return user;
- }
-
- public User getToUser() {
- return toUser;
- }
-}
diff --git a/juick-common/src/main/java/com/juick/service/component/TopEvent.java b/juick-common/src/main/java/com/juick/service/component/TopEvent.java
deleted file mode 100644
index b7e24957..00000000
--- a/juick-common/src/main/java/com/juick/service/component/TopEvent.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.juick.service.component;
-
-import com.juick.Message;
-import org.springframework.context.ApplicationEvent;
-
-public class TopEvent extends ApplicationEvent {
- private Message message;
- /**
- * Create a new ApplicationEvent.
- *
- * @param source the object on which the event initially occurred (never {@code null})
- */
- public TopEvent(Object source, Message message) {
- super(source);
- this.message = message;
- }
-
- public Message getMessage() {
- return message;
- }
-}
diff --git a/juick-common/src/main/java/com/juick/service/component/UserUpdatedEvent.java b/juick-common/src/main/java/com/juick/service/component/UserUpdatedEvent.java
deleted file mode 100644
index af2f579a..00000000
--- a/juick-common/src/main/java/com/juick/service/component/UserUpdatedEvent.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.juick.service.component;
-
-import com.juick.User;
-import org.springframework.context.ApplicationEvent;
-import org.springframework.lang.NonNull;
-
-public class UserUpdatedEvent extends ApplicationEvent {
- private User user;
- /**
- * Generated when user is updated (avatar changed, etc).
- *
- * @param source the object on which the event initially occurred (never {@code null})
- * @param user updated user
- */
- public UserUpdatedEvent(@NonNull Object source, User user) {
- super(source);
- this.user = user;
- }
-
- public User getUser() {
- return user;
- }
-}