mirror of
https://github.com/bisq-network/bisq.git
synced 2025-03-13 11:09:10 +01:00
Refactor: add new setup method to CommonSetup with config (WIP) and call it at doExecute. Move AsciiLogo to CommonSetup
This commit is contained in:
parent
fe7ccbd6f9
commit
b6e97e371e
2 changed files with 11 additions and 5 deletions
|
@ -18,6 +18,8 @@
|
|||
package bisq.common.setup;
|
||||
|
||||
import bisq.common.UserThread;
|
||||
import bisq.common.app.AsciiLogo;
|
||||
import bisq.common.config.Config;
|
||||
import bisq.common.crypto.CryptoUtils;
|
||||
import bisq.common.crypto.LimitedKeyStrengthException;
|
||||
import bisq.common.util.Utilities;
|
||||
|
@ -33,10 +35,13 @@ import lombok.extern.slf4j.Slf4j;
|
|||
@Slf4j
|
||||
public class CommonSetup {
|
||||
|
||||
public static void setup(Config config) {
|
||||
AsciiLogo.showAsciiLogo();
|
||||
setSystemProperties();
|
||||
}
|
||||
|
||||
public static void setup(UncaughtExceptionHandler uncaughtExceptionHandler) {
|
||||
setupErrorHandler(uncaughtExceptionHandler);
|
||||
|
||||
setSystemProperties();
|
||||
}
|
||||
|
||||
protected static void setSystemProperties() {
|
||||
|
|
|
@ -32,13 +32,13 @@ import bisq.network.p2p.P2PService;
|
|||
|
||||
import bisq.common.UserThread;
|
||||
import bisq.common.app.AppModule;
|
||||
import bisq.common.app.AsciiLogo;
|
||||
import bisq.common.app.DevEnv;
|
||||
import bisq.common.config.BisqHelpFormatter;
|
||||
import bisq.common.config.Config;
|
||||
import bisq.common.config.ConfigException;
|
||||
import bisq.common.handlers.ResultHandler;
|
||||
import bisq.common.proto.persistable.PersistedDataHost;
|
||||
import bisq.common.setup.CommonSetup;
|
||||
import bisq.common.setup.GracefulShutDownHandler;
|
||||
import bisq.common.util.Utilities;
|
||||
|
||||
|
@ -103,9 +103,10 @@ public abstract class BisqExecutable implements GracefulShutDownHandler, BisqSet
|
|||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
protected void doExecute() {
|
||||
AsciiLogo.showAsciiLogo();
|
||||
configUserThread();
|
||||
CommonSetup.setup(config);
|
||||
CoreSetup.setup(config);
|
||||
|
||||
configUserThread();
|
||||
addCapabilities();
|
||||
|
||||
Signal.handle(new Signal("INT"), signal -> {
|
||||
|
|
Loading…
Add table
Reference in a new issue