From 889748712a761440cc7cb5ef0f1579a1da4911c4 Mon Sep 17 00:00:00 2001 From: Zaxar163 Date: Fri, 3 May 2019 10:36:42 +0300 Subject: [PATCH] =?UTF-8?q?[ANY]=20=D0=A3=D0=B4=D0=B0=D0=BB=D0=B8=D0=BB=20?= =?UTF-8?q?EchoRequest.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../websocket/WebSocketService.java | 2 -- .../websocket/json/EchoResponse.java | 25 ----------------- .../websockets/ClientWebSocketService.java | 1 - .../events/request/EchoRequestEvent.java | 27 ------------------- 4 files changed, 55 deletions(-) delete mode 100644 LaunchServer/src/main/java/ru/gravit/launchserver/websocket/json/EchoResponse.java delete mode 100644 libLauncher/src/main/java/ru/gravit/launcher/events/request/EchoRequestEvent.java diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/WebSocketService.java b/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/WebSocketService.java index 915fc9f3..e6aad83a 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/WebSocketService.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/WebSocketService.java @@ -16,7 +16,6 @@ import ru.gravit.launcher.request.ResultInterface; import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.socket.Client; -import ru.gravit.launchserver.websocket.json.EchoResponse; import ru.gravit.launchserver.websocket.json.JsonResponseAdapter; import ru.gravit.launchserver.websocket.json.JsonResponseInterface; import ru.gravit.launchserver.websocket.json.SimpleResponse; @@ -99,7 +98,6 @@ public void registerClient(Channel channel) { } public void registerResponses() { - registerResponse("echo", EchoResponse.class); registerResponse("auth", AuthResponse.class); registerResponse("checkServer", CheckServerResponse.class); registerResponse("joinServer", JoinServerResponse.class); diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/json/EchoResponse.java b/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/json/EchoResponse.java deleted file mode 100644 index 257af457..00000000 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/json/EchoResponse.java +++ /dev/null @@ -1,25 +0,0 @@ -package ru.gravit.launchserver.websocket.json; - -import io.netty.channel.ChannelHandlerContext; -import ru.gravit.launcher.events.request.EchoRequestEvent; -import ru.gravit.launchserver.socket.Client; -import ru.gravit.utils.helper.LogHelper; - -public class EchoResponse extends SimpleResponse { - public final String echo; - - public EchoResponse(String echo) { - this.echo = echo; - } - - @Override - public String getType() { - return "echo"; - } - - @Override - public void execute(ChannelHandlerContext ctx, Client client) { - LogHelper.info("Echo: %s, isAuth %s", echo, client.isAuth ? "true" : "false"); - service.sendObject(ctx, new EchoRequestEvent(echo)); - } -} diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/websockets/ClientWebSocketService.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/websockets/ClientWebSocketService.java index b47ccf66..3731eb51 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/websockets/ClientWebSocketService.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/websockets/ClientWebSocketService.java @@ -102,7 +102,6 @@ public void registerResult(String key, Class clazz) { } public void registerResults() { - registerResult("echo", EchoRequestEvent.class); registerResult("auth", AuthRequestEvent.class); registerResult("checkServer", CheckServerRequestEvent.class); registerResult("joinServer", JoinServerRequestEvent.class); diff --git a/libLauncher/src/main/java/ru/gravit/launcher/events/request/EchoRequestEvent.java b/libLauncher/src/main/java/ru/gravit/launcher/events/request/EchoRequestEvent.java deleted file mode 100644 index 6d57bb04..00000000 --- a/libLauncher/src/main/java/ru/gravit/launcher/events/request/EchoRequestEvent.java +++ /dev/null @@ -1,27 +0,0 @@ -package ru.gravit.launcher.events.request; - -import ru.gravit.launcher.LauncherNetworkAPI; -import ru.gravit.launcher.events.RequestEvent; -import ru.gravit.utils.event.EventInterface; - -import java.util.UUID; - -public class EchoRequestEvent extends RequestEvent implements EventInterface { - private static final UUID uuid = UUID.fromString("0a1f820f-7cd5-47a5-ae0e-17492e0e1fe1"); - @LauncherNetworkAPI - public String echo; - - public EchoRequestEvent(String echo) { - this.echo = echo; - } - - @Override - public String getType() { - return "echo"; - } - - @Override - public UUID getUUID() { - return uuid; - } -}