From 7aaa3f9a29c280f01c677c918932620be45cdbd7 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 8 Nov 2018 21:38:27 +0300 Subject: Merge everything into single Spring Boot application --- .../juick/service/component/DisconnectedEvent.java | 14 --------- .../com/juick/service/component/LikeEvent.java | 36 ---------------------- .../com/juick/service/component/MessageEvent.java | 31 ------------------- .../juick/service/component/MessageReadEvent.java | 30 ------------------ .../service/component/NotificationListener.java | 25 --------------- .../com/juick/service/component/PingEvent.java | 21 ------------- .../juick/service/component/SubscribeEvent.java | 27 ---------------- .../java/com/juick/service/component/TopEvent.java | 21 ------------- .../juick/service/component/UserUpdatedEvent.java | 23 -------------- 9 files changed, 228 deletions(-) delete mode 100644 juick-common/src/main/java/com/juick/service/component/DisconnectedEvent.java delete mode 100644 juick-common/src/main/java/com/juick/service/component/LikeEvent.java delete mode 100644 juick-common/src/main/java/com/juick/service/component/MessageEvent.java delete mode 100644 juick-common/src/main/java/com/juick/service/component/MessageReadEvent.java delete mode 100644 juick-common/src/main/java/com/juick/service/component/NotificationListener.java delete mode 100644 juick-common/src/main/java/com/juick/service/component/PingEvent.java delete mode 100644 juick-common/src/main/java/com/juick/service/component/SubscribeEvent.java delete mode 100644 juick-common/src/main/java/com/juick/service/component/TopEvent.java delete mode 100644 juick-common/src/main/java/com/juick/service/component/UserUpdatedEvent.java (limited to 'juick-common/src/main/java/com/juick/service/component') 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 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 subscribers) { - super(source); - this.message = message; - this.user = user; - this.subscribers = subscribers; - } - - public User getUser() { - return user; - } - - public Message getMessage() { - return message; - } - - public List 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 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 interestedUsers) { - super(source); - this.message = message; - this.users = interestedUsers; - } - - public Message getMessage() { - return message; - } - public List 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; - } -} -- cgit v1.2.3