From 39c1884fdbb9ea8c8f32eac19d05220e91e9f5b5 Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Fri, 17 Mar 2023 03:17:11 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B8=D0=BD=D0=B3=20EventHandler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../godfather/quarkus/context/service/EventHandler.java | 3 +-- .../godfather/simple/context/service/EventHandler.java | 4 +--- .../godfather/quarkus/core/provider/StoryLineHandler.java | 2 +- .../godfather/simple/core/provider/ChatStoryLineHandler.java | 2 +- .../simple/core/provider/PersonStoryLineHandler.java | 2 +- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/service/EventHandler.java b/bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/service/EventHandler.java index ac57bdc..9ccdc71 100644 --- a/bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/service/EventHandler.java +++ b/bot-context/bot-context-quarkus/src/main/java/dev/struchkov/godfather/quarkus/context/service/EventHandler.java @@ -1,9 +1,8 @@ package dev.struchkov.godfather.quarkus.context.service; -import dev.struchkov.godfather.main.domain.event.Event; import io.smallrye.mutiny.Uni; -public interface EventHandler { +public interface EventHandler { Uni handle(T event); diff --git a/bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context/service/EventHandler.java b/bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context/service/EventHandler.java index be87522..b537a3f 100644 --- a/bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context/service/EventHandler.java +++ b/bot-context/bot-context-simple/src/main/java/dev/struchkov/godfather/simple/context/service/EventHandler.java @@ -1,8 +1,6 @@ package dev.struchkov.godfather.simple.context.service; -import dev.struchkov.godfather.main.domain.event.Event; - -public interface EventHandler { +public interface EventHandler { void handle(T event); diff --git a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/provider/StoryLineHandler.java b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/provider/StoryLineHandler.java index 691629a..928694e 100644 --- a/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/provider/StoryLineHandler.java +++ b/bot-core/bot-core-quarkus/src/main/java/dev/struchkov/godfather/quarkus/core/provider/StoryLineHandler.java @@ -20,7 +20,7 @@ public class StoryLineHandler implements EventHandler { @Override public String getEventType() { - return Mail.TYPE; + return Mail.class.getName(); } } diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/provider/ChatStoryLineHandler.java b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/provider/ChatStoryLineHandler.java index 70400b8..af40257 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/provider/ChatStoryLineHandler.java +++ b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/provider/ChatStoryLineHandler.java @@ -19,7 +19,7 @@ public class ChatStoryLineHandler implements EventHandler { @Override public String getEventType() { - return ChatMail.TYPE; + return ChatMail.class.getName(); } } diff --git a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/provider/PersonStoryLineHandler.java b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/provider/PersonStoryLineHandler.java index 8476abd..776bfbf 100644 --- a/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/provider/PersonStoryLineHandler.java +++ b/bot-core/bot-core-simple/src/main/java/dev/struchkov/godfather/simple/core/provider/PersonStoryLineHandler.java @@ -19,7 +19,7 @@ public class PersonStoryLineHandler implements EventHandler { @Override public String getEventType() { - return Mail.TYPE; + return Mail.class.getName(); } }