mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
[ANY] Рефакторинг.
This commit is contained in:
parent
b325609a59
commit
3a69e622ec
7 changed files with 10 additions and 11 deletions
|
@ -1,7 +1,6 @@
|
||||||
package ru.gravit.launchserver.manangers;
|
package ru.gravit.launchserver.manangers;
|
||||||
|
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
import ru.gravit.launcher.Launcher;
|
|
||||||
import ru.gravit.launcher.managers.GsonManager;
|
import ru.gravit.launcher.managers.GsonManager;
|
||||||
import ru.gravit.launchserver.auth.handler.AuthHandler;
|
import ru.gravit.launchserver.auth.handler.AuthHandler;
|
||||||
import ru.gravit.launchserver.auth.hwid.HWIDHandler;
|
import ru.gravit.launchserver.auth.hwid.HWIDHandler;
|
||||||
|
@ -11,7 +10,6 @@
|
||||||
import ru.gravit.launchserver.auth.texture.TextureProvider;
|
import ru.gravit.launchserver.auth.texture.TextureProvider;
|
||||||
import ru.gravit.launchserver.components.Component;
|
import ru.gravit.launchserver.components.Component;
|
||||||
import ru.gravit.utils.UniversalJsonAdapter;
|
import ru.gravit.utils.UniversalJsonAdapter;
|
||||||
import ru.gravit.utils.helper.LogHelper;
|
|
||||||
|
|
||||||
public class LaunchServerGsonManager extends GsonManager {
|
public class LaunchServerGsonManager extends GsonManager {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
@SuppressWarnings({"unused", "rawtypes"})
|
@SuppressWarnings("rawtypes")
|
||||||
public class WebSocketService {
|
public class WebSocketService {
|
||||||
public final ChannelGroup channels;
|
public final ChannelGroup channels;
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,8 @@ public R request() throws Exception {
|
||||||
return requestDo();
|
return requestDo();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected R requestDo() throws Exception
|
@SuppressWarnings("unchecked")
|
||||||
|
protected R requestDo() throws Exception
|
||||||
{
|
{
|
||||||
return (R) service.sendRequest(this);
|
return (R) service.sendRequest(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,12 +18,13 @@ public class StandartClientWebSocketService extends ClientWebSocketService {
|
||||||
public StandartClientWebSocketService(GsonBuilder gsonBuilder, String address, int i) {
|
public StandartClientWebSocketService(GsonBuilder gsonBuilder, String address, int i) {
|
||||||
super(gsonBuilder, address, i);
|
super(gsonBuilder, address, i);
|
||||||
}
|
}
|
||||||
public class RequestFuture implements Future
|
public class RequestFuture implements Future<ResultInterface>
|
||||||
{
|
{
|
||||||
public final WaitEventHandler.ResultEvent event;
|
public final WaitEventHandler.ResultEvent event;
|
||||||
public boolean isCanceled = false;
|
public boolean isCanceled = false;
|
||||||
|
|
||||||
public RequestFuture(RequestInterface request) throws IOException {
|
@SuppressWarnings("rawtypes")
|
||||||
|
public RequestFuture(RequestInterface request) throws IOException {
|
||||||
event = new WaitEventHandler.ResultEvent();
|
event = new WaitEventHandler.ResultEvent();
|
||||||
event.type = request.getType();
|
event.type = request.getType();
|
||||||
if(request instanceof Request)
|
if(request instanceof Request)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
targetCompatibility = '1.8'
|
targetCompatibility = '1.8'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly 'org.fusesource.jansi:jansi:1.17.1'
|
compileOnly 'org.fusesource.jansi:jansi:1.17.1'
|
||||||
compileOnly 'jline:jline:2.14.6'
|
compileOnly 'jline:jline:2.14.6'
|
||||||
compile 'com.google.code.gson:gson:2.8.5'
|
compile 'com.google.code.gson:gson:2.8.5'
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package ru.gravit.utils;
|
package ru.gravit.utils;
|
||||||
|
|
||||||
import ru.gravit.utils.helper.LogHelper;
|
|
||||||
import ru.gravit.utils.helper.VerifyHelper;
|
import ru.gravit.utils.helper.VerifyHelper;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
2
modules
2
modules
|
@ -1 +1 @@
|
||||||
Subproject commit 24f1909589b8bfa23064725fe65a734a9f7af281
|
Subproject commit 412ac81c5c60b572d4e36ebdb7c2828dbac86876
|
Loading…
Reference in a new issue