[ANY] Удалил EchoRequest.

This commit is contained in:
Zaxar163 2019-05-03 10:36:42 +03:00
parent 03a70c1d73
commit 889748712a
4 changed files with 0 additions and 55 deletions

View file

@ -16,7 +16,6 @@
import ru.gravit.launcher.request.ResultInterface; import ru.gravit.launcher.request.ResultInterface;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.socket.Client; 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.JsonResponseAdapter;
import ru.gravit.launchserver.websocket.json.JsonResponseInterface; import ru.gravit.launchserver.websocket.json.JsonResponseInterface;
import ru.gravit.launchserver.websocket.json.SimpleResponse; import ru.gravit.launchserver.websocket.json.SimpleResponse;
@ -99,7 +98,6 @@ public void registerClient(Channel channel) {
} }
public void registerResponses() { public void registerResponses() {
registerResponse("echo", EchoResponse.class);
registerResponse("auth", AuthResponse.class); registerResponse("auth", AuthResponse.class);
registerResponse("checkServer", CheckServerResponse.class); registerResponse("checkServer", CheckServerResponse.class);
registerResponse("joinServer", JoinServerResponse.class); registerResponse("joinServer", JoinServerResponse.class);

View file

@ -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));
}
}

View file

@ -102,7 +102,6 @@ public void registerResult(String key, Class<? extends ResultInterface> clazz) {
} }
public void registerResults() { public void registerResults() {
registerResult("echo", EchoRequestEvent.class);
registerResult("auth", AuthRequestEvent.class); registerResult("auth", AuthRequestEvent.class);
registerResult("checkServer", CheckServerRequestEvent.class); registerResult("checkServer", CheckServerRequestEvent.class);
registerResult("joinServer", JoinServerRequestEvent.class); registerResult("joinServer", JoinServerRequestEvent.class);

View file

@ -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;
}
}