58: Add initial Suwimo Client bootstrap
This commit is contained in:
@@ -13,6 +13,8 @@ import com.r35157.nenjim.ntt.NenjimTestTool;
|
||||
import com.r35157.nenjim.ntt.impl.ref.NenjimTestToolImpl;
|
||||
import com.r35157.stm.SodaTaskManager;
|
||||
import com.r35157.stm.impl.ref.SodaTaskManagerImpl;
|
||||
import com.r35157.suwimo.hub.client.SuwimoClient;
|
||||
import com.r35157.suwimo.hub.client.impl.j2fx.SuwimoClientImpl;
|
||||
import crypto.r35157.nenjim.NenjimProcess;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -60,6 +62,7 @@ public class NenjimHubImpl implements NenjimHub {
|
||||
startNenjimProcessManager();
|
||||
startNenjimTestTool();
|
||||
startSodaTaskManager();
|
||||
startSuwimoClient();
|
||||
|
||||
// TODO: Old but more correct way to auto start plugins - but it is currently broken.
|
||||
/*
|
||||
@@ -210,6 +213,21 @@ public class NenjimHubImpl implements NenjimHub {
|
||||
|
||||
}
|
||||
|
||||
private void startSuwimoClient() {
|
||||
Thread thread = new Thread(() -> {
|
||||
try {
|
||||
SuwimoClient client = new SuwimoClientImpl();
|
||||
client.start();
|
||||
} catch (Throwable throwable) {
|
||||
throwable.printStackTrace();
|
||||
}
|
||||
}, "Nenjim Plugin - Suwimo Client");
|
||||
|
||||
thread.setDaemon(false);
|
||||
thread.start();
|
||||
|
||||
}
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(NenjimHubImpl.class);
|
||||
private final CountDownLatch shutdownLatch = new CountDownLatch(1);
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.r35157.suwimo.hub.client;
|
||||
|
||||
public interface SuwimoClient {
|
||||
void start();
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.r35157.suwimo.hub.client.impl.j2fx;
|
||||
|
||||
import com.r35157.libs.javafx.JavaFxRuntime;
|
||||
import com.r35157.suwimo.hub.client.SuwimoClient;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
public final class SuwimoClientImpl implements SuwimoClient {
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
JavaFxRuntime.runLater(this::showWindow);
|
||||
}
|
||||
|
||||
private void showWindow() {
|
||||
Stage window = new Stage();
|
||||
window.setTitle("Suwimo Client");
|
||||
window.show();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user