Рефакторинг EventHandler
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Struchkov Mark 2023-03-17 03:17:11 +03:00
parent 69b6b38e86
commit 39c1884fdb
Signed by: upagge
GPG Key ID: D3018BE7BA428CA6
5 changed files with 5 additions and 8 deletions

View File

@ -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<T extends Event> {
public interface EventHandler<T> {
Uni<Void> handle(T event);

View File

@ -1,8 +1,6 @@
package dev.struchkov.godfather.simple.context.service;
import dev.struchkov.godfather.main.domain.event.Event;
public interface EventHandler<T extends Event> {
public interface EventHandler<T> {
void handle(T event);

View File

@ -20,7 +20,7 @@ public class StoryLineHandler implements EventHandler<Mail> {
@Override
public String getEventType() {
return Mail.TYPE;
return Mail.class.getName();
}
}

View File

@ -19,7 +19,7 @@ public class ChatStoryLineHandler implements EventHandler<ChatMail> {
@Override
public String getEventType() {
return ChatMail.TYPE;
return ChatMail.class.getName();
}
}

View File

@ -19,7 +19,7 @@ public class PersonStoryLineHandler implements EventHandler<Mail> {
@Override
public String getEventType() {
return Mail.TYPE;
return Mail.class.getName();
}
}