mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
Базовые события
This commit is contained in:
parent
5c99ffd69a
commit
01fdbdf305
3 changed files with 56 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue