diff --git a/libLauncher/src/main/java/ru/gravit/launcher/events/ControlEvent.java b/libLauncher/src/main/java/ru/gravit/launcher/events/ControlEvent.java new file mode 100644 index 00000000..7f5c9028 --- /dev/null +++ b/libLauncher/src/main/java/ru/gravit/launcher/events/ControlEvent.java @@ -0,0 +1,23 @@ +package ru.gravit.launcher.events; + +import ru.gravit.utils.event.EventInterface; + +import java.util.UUID; + +//Набор стандартных событий +public class ControlEvent implements EventInterface { + private static final UUID uuid = UUID.fromString("f1051a64-0cd0-4ed8-8430-d856a196e91f"); + public enum ControlCommand { + STOP,START,PAUSE,CONTINUE,CRASH + } + + public ControlEvent(ControlCommand signal) { + this.signal = signal; + } + + public ControlCommand signal; + @Override + public UUID getUUID() { + return uuid; + } +} diff --git a/libLauncher/src/main/java/ru/gravit/launcher/events/PingEvent.java b/libLauncher/src/main/java/ru/gravit/launcher/events/PingEvent.java new file mode 100644 index 00000000..2712b5c3 --- /dev/null +++ b/libLauncher/src/main/java/ru/gravit/launcher/events/PingEvent.java @@ -0,0 +1,16 @@ +package ru.gravit.launcher.events; + +import ru.gravit.utils.event.EventInterface; + +import java.util.UUID; + +//Пустое событие +//Все обработчики обязаны его игнорировать +public final class PingEvent implements EventInterface { + private static final UUID uuid = UUID.fromString("7c8be7e7-82ce-4c99-84cd-ee8fcce1b509"); + @Override + public UUID getUUID() { + + return uuid; + } +} diff --git a/libLauncher/src/main/java/ru/gravit/launcher/events/SignalEvent.java b/libLauncher/src/main/java/ru/gravit/launcher/events/SignalEvent.java new file mode 100644 index 00000000..2e469657 --- /dev/null +++ b/libLauncher/src/main/java/ru/gravit/launcher/events/SignalEvent.java @@ -0,0 +1,17 @@ +package ru.gravit.launcher.events; + +import ru.gravit.utils.event.EventInterface; + +import java.util.UUID; +//Используется, что бы послать короткое сообщение, которое вмещается в int +public class SignalEvent implements EventInterface { + private static final UUID uuid = UUID.fromString("edc3afa1-2726-4da3-95c6-7e6994b981e1"); + public int signal; + public SignalEvent(int signal) { + this.signal = signal; + } + @Override + public UUID getUUID() { + return uuid; + } +}