res = new HashMap<>();
- String params = path.substring(prefix.length());
- if (!params.isEmpty()) {
- String[] elements = params.split("/");
- //first element after split() may be ""
- int start = 0;
- if (elements.length > 0) {
- if (elements[0].isEmpty()) {
- start = 1;
- }
- }
- for (int i = start; i < elements.length; i++) {
- if (i >= paramNames.size() + start) {
- break;
- }
- res.put(paramNames.get(i - start), elements[i]);
- }
- }
- return res;
- }
-}
diff --git a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/client/impl/ResponseLatch.java b/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/client/impl/ResponseLatch.java
deleted file mode 100644
index c694aabad3..0000000000
--- a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/client/impl/ResponseLatch.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright © 2020 Apollo Foundation
- */
-package com.apollocurrency.aplwallet.apl.util.supervisor.client.impl;
-
-import com.apollocurrency.aplwallet.apl.util.supervisor.msg.SvBusResponse;
-import lombok.extern.slf4j.Slf4j;
-
-import java.net.SocketTimeoutException;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-/**
- * Latch to response waiting
- *
- * @author alukin@gmail.com
- */
-@Slf4j
-public class ResponseLatch {
-
- /**
- * time to live of entry. Entry should de deleted if it is older
- */
- public static long WSW_TTL_MS = 60000; //1 minute
- private final CountDownLatch latch = new CountDownLatch(1);
- private final long createTime = System.currentTimeMillis();
- /**
- * Response message
- */
- private volatile SvBusResponse response;
-
- /**
- * Wait for the response
- *
- * The caller must hold the lock for the request condition
- *
- * @param timeoutMs Wait timeout
- * @return Response message
- * @throws java.net.SocketTimeoutException
- */
- public T get(long timeoutMs) throws SocketTimeoutException {
- try {
- if (!latch.await(timeoutMs, TimeUnit.MILLISECONDS)) {
- throw new SocketTimeoutException("WebSocket response wait timeout (" + timeoutMs + "ms) exceeded");
- }
- } catch (InterruptedException ex) {
- log.debug("Interruptrd exception while waiting for response", ex);
- Thread.currentThread().interrupt();
- }
- return (T) response;
- }
-
- public void setResponse(T response) {
- this.response = response;
- latch.countDown();
- }
-
- public boolean isOld() {
- long now = System.currentTimeMillis();
- boolean res = (now - createTime) > WSW_TTL_MS;
- return res;
- }
-}
diff --git a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/client/impl/SvBusClient.java b/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/client/impl/SvBusClient.java
deleted file mode 100644
index 2a0ac1ec03..0000000000
--- a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/client/impl/SvBusClient.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * Copyright © 2020 Apollo Foundation
- */
-package com.apollocurrency.aplwallet.apl.util.supervisor.client.impl;
-
-import com.apollocurrency.aplwallet.apl.util.supervisor.client.ConnectionStatus;
-import com.apollocurrency.aplwallet.apl.util.supervisor.client.MessageDispatcher;
-import com.apollocurrency.aplwallet.apl.util.supervisor.msg.SvBusStatus;
-import com.apollocurrency.aplwallet.apl.util.supervisor.msg.SvBusErrorCodes;
-import com.apollocurrency.aplwallet.apl.util.supervisor.msg.SvBusResponse;
-import com.apollocurrency.aplwallet.apl.util.supervisor.msg.SvChannelHeader;
-import com.apollocurrency.aplwallet.apl.util.supervisor.msg.SvChannelMessage;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import lombok.Getter;
-import lombok.extern.slf4j.Slf4j;
-
-import java.io.Closeable;
-import java.net.URI;
-import java.net.http.HttpClient;
-import java.net.http.WebSocket;
-import java.net.http.WebSocket.Listener;
-import java.nio.ByteBuffer;
-import java.util.Date;
-import java.util.concurrent.CompletionException;
-import java.util.concurrent.CompletionStage;
-
-/**
- * Client of Apollo Supervisor or similar service with the same protocol.
- *
- * @author alukin@gmail.com
- */
-@Slf4j
-public class SvBusClient implements Listener, Closeable {
-
- private ConnectionStatus state = ConnectionStatus.NOT_CONNECTD;
- private WebSocket webSocket;
- @Getter
- private final URI serverURI;
- private final HttpClient httpClient;
-
- private PathParamProcessor pathProcessor;
- private final MessageDispatcherImpl dispatcher;
-
- public SvBusClient(URI serverURI, MessageDispatcher dispatcher) {
- this.pathProcessor = new PathParamProcessor();
- this.dispatcher = (MessageDispatcherImpl) dispatcher;
- this.serverURI = serverURI;
- httpClient = HttpClient.newHttpClient();
-
- }
-
- public boolean isConnected() {
- return state == ConnectionStatus.CONNECTED;
- }
-
- public ConnectionStatus getState() {
- return state;
- }
-
- private void setState(ConnectionStatus cs) {
- state = cs;
- }
-
- /**
- * Connect to given by constructor URI
- *
- * @return true if connected
- */
- public boolean connect() {
- boolean res;
- setState(ConnectionStatus.CONNECTING);
- try {
- webSocket = httpClient.newWebSocketBuilder()
- .buildAsync(serverURI, this)
- .join();
- res = !webSocket.isInputClosed();
- if (res) {
- dispatcher.onConnectionUp(serverURI);
- }
- } catch (CompletionException ex) {
- setState(ConnectionStatus.ERROR);
- log.info("Can not connect to {}", serverURI);
- res = false;
- } catch (Exception e) {
- res = false;
- setState(ConnectionStatus.ERROR);
- log.error("Unknown error occurred during connection to " + serverURI, e);
- }
- return res;
- }
-
- public WebSocket getWebSocket() {
- return webSocket;
- }
-
- public boolean sendMessage(SvChannelMessage envelope) throws JsonProcessingException {
- boolean res = false;
- //TODO: binary mode with binary header
- envelope.header.from_timestamp = new Date();
- ObjectMapper mapper = pathProcessor.getMapper();
- String msg = mapper.writeValueAsString(envelope);
- if (webSocket != null) {
- webSocket.sendText(msg, true);
- //TODO may be join() ?
- res = true;
- } else {
- log.error("Websocket is not connected error");
- }
- return res;
- }
-
- public void sendError(int code, String message, SvChannelHeader rqheader) {
- SvBusStatus error = new SvBusStatus(code, message);
- SvBusResponse resp = new SvBusResponse(error);
- SvChannelHeader hdr = new SvChannelHeader();
- hdr.from = dispatcher.getMyAddress().toString();
- if (rqheader != null) {
- hdr.to = rqheader.from;
- hdr.path = rqheader.path;
- hdr.inResponseTo = hdr.messageId;
- } else {
- hdr.to = serverURI.toString();
- hdr.path = MessageDispatcher.ERROR_PATH;
- hdr.inResponseTo = 0L;
- }
- hdr.from_timestamp = new Date();
- hdr.messageId = dispatcher.nextMessageId();
- SvChannelMessage msg = new SvChannelMessage(hdr, resp);
- try { //trying my besr, no result check
- sendMessage(msg);
- } catch (JsonProcessingException ex) {
- }
- }
-
-// should be common for binary and text mode
- private void processIncoming(CharSequence data, boolean bin) {
- try {
- ObjectMapper mapper = pathProcessor.getMapper();
- JsonNode env_node = mapper.readTree(data.toString());
- JsonNode header_node = env_node.findValue("header");
- if (header_node == null) {
- sendError(SvBusErrorCodes.INVALID_HEADER, "no header node in JSON", null);
- log.error("No header in incoming message");
- return;
- }
- SvChannelHeader header = mapper.treeToValue(header_node, SvChannelHeader.class);
- if (header == null) {
- log.error("Can not parse header. Message: {}", data);
- sendError(SvBusErrorCodes.INVALID_HEADER, "Invalid header node in JSON", null);
- return;
- }
- JsonNode body = env_node.findValue("body"); // same as above, i think that better to add validation for npes to guarantee message correct format
- if (body == null) {
- log.warn("No body node in JSON");
- }
- dispatcher.handleIncoming(header, body);
- } catch (JsonProcessingException ex) {
- sendError(SvBusErrorCodes.INVALID_MESSAGE, "Invalud JSON message: " + ex.getMessage(), null);
- log.error("JSON processing error. Message: {}", data, ex);
- }
- }
-
- //TODO: implement
- private SvChannelMessage decodeBinary(ByteBuffer data) {
- log.error("Binary mode is not implemented yet");
- return null;
- }
-
- //TODO: implement
- private ByteBuffer encodeBinary(SvChannelMessage data) {
- log.error("Binary mode is not implemented yet");
- return null;
- }
-
- @Override
- public CompletionStage> onText(WebSocket webSocket, CharSequence data, boolean last) {
-
- log.debug("onText: {}", data);
- processIncoming(data, false);
- return Listener.super.onText(webSocket, data, last);
- }
-
- @Override
- public void onOpen(WebSocket webSocket) {
- setState(ConnectionStatus.CONNECTED);
- Listener.super.onOpen(webSocket);
- }
-
- @Override
- public CompletionStage> onClose(WebSocket webSocket, int statusCode,
- String reason) {
- log.debug("onClose: {} {}", statusCode, reason);
- setState(ConnectionStatus.DISCONNECTED);
- return Listener.super.onClose(webSocket, statusCode, reason);
- }
-
- @Override
- public void onError(WebSocket webSocket, Throwable error) {
- setState(state.ERROR); //TODO maybe save or print error stacktrace
- log.debug("Error: ", error);
- Listener.super.onError(webSocket, error);
- }
-
- @Override
- public CompletionStage> onPong(WebSocket webSocket, ByteBuffer message) {
- log.debug("onPong: ");
- return Listener.super.onPong(webSocket, message);
- }
-
- @Override
- public CompletionStage> onPing(WebSocket webSocket, ByteBuffer message) {
- log.debug("onPing: ");
- return Listener.super.onPing(webSocket, message);
- }
-
- @Override
- public CompletionStage> onBinary(WebSocket webSocket, ByteBuffer data, boolean last) {
-
- // processIncoming(webSocket, decodeBinary(data), true);
- return Listener.super.onBinary(webSocket, data, last);
- }
-
- @Override
- public void close() {
- if (webSocket != null) {
- webSocket.sendClose(WebSocket.NORMAL_CLOSURE, "ok");
- }
- }
-
- void sendText(CharSequence value) {
- webSocket.sendText(value, true);
- }
-}
diff --git a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/client/impl/SvBusServiceImpl.java b/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/client/impl/SvBusServiceImpl.java
deleted file mode 100644
index eb12631332..0000000000
--- a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/client/impl/SvBusServiceImpl.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright © 2020 Apollo Foundation
- */
-package com.apollocurrency.aplwallet.apl.util.supervisor.client.impl;
-
-import com.apollocurrency.aplwallet.apl.util.supervisor.client.ConnectionStatus;
-import com.apollocurrency.aplwallet.apl.util.supervisor.client.MessageDispatcher;
-import com.apollocurrency.aplwallet.apl.util.supervisor.client.SvBusService;
-import com.apollocurrency.aplwallet.apl.util.supervisor.msg.SvBusHello;
-import com.apollocurrency.aplwallet.apl.util.supervisor.msg.SvBusRequest;
-import com.apollocurrency.aplwallet.apl.util.supervisor.msg.SvBusResponse;
-
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.CompletableFuture;
-
-/**
- * Implementation of bus service
- *
- * @author alukin@gmail.com
- */
-public class SvBusServiceImpl implements SvBusService {
-
- private final MessageDispatcherImpl dispatcher;
-
- public SvBusServiceImpl() {
- SvBusHello hello = new SvBusHello();
- hello.clientPID = ProcessHandle.current().pid();
- hello.clientExePath = "";
- hello.clientInfo = "SvClient";
- dispatcher = new MessageDispatcherImpl();
- }
-
- @Override
- public void addConnection(URI uri, boolean isDefault) {
- dispatcher.addConnection(uri, isDefault);
- }
-
- @Override
- public void addResponseMapping(String path, Class tClass) {
- dispatcher.registerResponseMapping(path, tClass);
- }
-
- @Override
- public void addParametrizedResponseMapping(String path, Class tClass, Class> paramClass) {
- dispatcher.registerParametrizedResponseMapping(path, tClass, paramClass);
- }
-
- @Override
- public Map getConnections() {
- Map clients = dispatcher.getConnections();
- Map statuses = new HashMap<>();
- for (URI key : clients.keySet()) {
- statuses.put(key, clients.get(key).getState());
- }
- return statuses;
- }
-
- @Override
- public MessageDispatcher getDispatcher() {
- return dispatcher;
- }
-
- @Override
- public T sendSync(SvBusRequest rq, String path, URI addr) {
- T resp = dispatcher.sendSync(rq, path, addr);
- return resp;
- }
-
- @Override
- public CompletableFuture sendAsync(SvBusRequest msg, String path, URI addr) {
- return dispatcher.sendAsync(msg, path, addr);
- }
-
- @Override
- public ConnectionStatus getConnectionStaus(URI uri) {
- Map statuses = getConnections();
- ConnectionStatus res = statuses.get(uri);
- return res;
- }
-
- @Override
- public void shutdown() {
- dispatcher.shutdown();
- }
-
- @Override
- public URI getMyAddress() {
- return dispatcher.getMyAddress();
- }
-
- @Override
- public void setMyInfo(SvBusHello info) {
- dispatcher.setMyInfo(info);
- }
-
-}
diff --git a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/client/impl/SvSessions.java b/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/client/impl/SvSessions.java
deleted file mode 100644
index 70cb8bc31e..0000000000
--- a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/client/impl/SvSessions.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright © 2020 Apollo Foundation
- */
-package com.apollocurrency.aplwallet.apl.util.supervisor.client.impl;
-
-import com.apollocurrency.aplwallet.apl.util.supervisor.client.ConnectionStatus;
-import lombok.extern.slf4j.Slf4j;
-
-import java.net.URI;
-import java.util.Map;
-import java.util.Timer;
-import java.util.TimerTask;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * Set of all connections inited
- *
- * @author alukin@gmail.com
- */
-@Slf4j
-public class SvSessions {
-
- private final Map connections = new ConcurrentHashMap<>();
- private final Timer timer;
- public static final long CONNECT_INTERVAL_MS = 5000;
- private Map.Entry defaultConnection;
- private final MessageDispatcherImpl dispatecher;
-
- public SvSessions(MessageDispatcherImpl dispatecher) {
- this.dispatecher = dispatecher;
- //init connection restore timer task
- //TODO: use our thread pool manager maybe
- //TODO: ScheduledThreadPoolExecutor is preferred to Timer, better to use it
- timer = new Timer("SypervisorConnectionChekcer", true);
- timer.scheduleAtFixedRate(new TimerTask() {
- @Override
- public void run() {
- for (URI key : connections.keySet()) {
- SvBusClient client = connections.get(key);
- if (!client.isConnected() && client.getState() != ConnectionStatus.CONNECTING) {
- boolean res = client.connect();
- log.debug("Connection attempt to URI {} result: {}, state: {}", key, res,
- client.getState()
- );
- if (res) {
- dispatecher.onConnectionUp(key);
- }
- }
- }
- }
-
- }, 0, CONNECT_INTERVAL_MS);
- }
-
- public Map getAll() {
- return connections;
- }
-
- void put(URI uri, SvBusClient client, boolean isDefault) {
- boolean setDefault = false;
- //first one is default even if isDefault is false
- if (connections.isEmpty()) {
- setDefault = true;
- }
- connections.putIfAbsent(uri, client);
- if (setDefault || isDefault) {
- defaultConnection = connections.entrySet().iterator().next();
- }
- }
-
- boolean isDefault(URI addr) {
- return defaultConnection != null && defaultConnection.getKey().equals(addr);
- }
-
- SvBusClient get(URI addr) {
- return connections.get(addr);
- }
-
- Map.Entry getDefault() {
- return defaultConnection;
- }
-
- void close() {
- timer.cancel();
- connections.values().forEach(c -> {
- c.close();
- });
- }
-
-}
diff --git a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvBusErrorCodes.java b/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvBusErrorCodes.java
deleted file mode 100644
index e7d8a80775..0000000000
--- a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvBusErrorCodes.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright © 2020 Apollo Foundation
- */
-package com.apollocurrency.aplwallet.apl.util.supervisor.msg;
-
-/**
- * Error codes for communication channel
- *
- * @author alukin@gmail.com
- */
-public class SvBusErrorCodes {
-
- public static final int OK = 0;
- public static final int NOT_CONNECTED = 1;
- public static final int NO_ROUTE = 2;
- public static final int NO_HANDLER = 3;
- public static final int PROCESSING_ERROR = 4;
- public static final int INVALID_HEADER = 5;
- public static final int INVALID_MESSAGE = 6;
- public static final int INVALID_BODY = 7;
- public static final int RESPONSE_TIMEOUT = 8;
-}
diff --git a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvBusHello.java b/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvBusHello.java
deleted file mode 100644
index e76a7573c9..0000000000
--- a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvBusHello.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright © 2020 Apollo Foundation
- */
-package com.apollocurrency.aplwallet.apl.util.supervisor.msg;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-
-/**
- * Hello message to be sent by any client on connection. It is needed to say
- * server client's address in header and other info
- *
- * @author alukin@gmail.con
- */
-@JsonInclude(JsonInclude.Include.NON_NULL)
-public class SvBusHello extends SvBusRequest {
-
- public Long clientPID;
- public String clientExePath;
- public String clientAddr;
- public String clientInfo;
-}
diff --git a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvBusMessage.java b/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvBusMessage.java
deleted file mode 100644
index 59f2055d90..0000000000
--- a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvBusMessage.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright © 2020 Apollo Foundation
- */
-package com.apollocurrency.aplwallet.apl.util.supervisor.msg;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * Simple message on bus
- *
- * @author alukin@gmail.com
- */
-@JsonInclude(Include.NON_NULL)
-@Getter
-@Setter
-public class SvBusMessage {
-
- private String message;
-}
diff --git a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvBusRequest.java b/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvBusRequest.java
deleted file mode 100644
index 24c913161f..0000000000
--- a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvBusRequest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright © 2020 Apollo Foundation
- */
-package com.apollocurrency.aplwallet.apl.util.supervisor.msg;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Request (incoming message) in SV channel
- *
- * @author alukin@gmail.com
- */
-@JsonInclude(JsonInclude.Include.NON_NULL)
-public class SvBusRequest extends SvBusMessage {
-
- private final Map parameters = new HashMap<>();
-
- public SvBusRequest(Map parameters) {
- this.parameters.putAll(parameters);
- }
-
- public SvBusRequest() {}
-
- public void add(T t, V v) {
- parameters.put(t.toString(), v.toString());
- }
-
- public String get(String param) {
- return parameters.get(param);
- }
-
-}
diff --git a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvBusResponse.java b/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvBusResponse.java
deleted file mode 100644
index 9c150bd47b..0000000000
--- a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvBusResponse.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright © 2020 Apollo Foundation
- */
-package com.apollocurrency.aplwallet.apl.util.supervisor.msg;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.NoArgsConstructor;
-
-/**
- * This class represents REST response in the channel
- *
- * @author alukin@gmail.com
- */
-@EqualsAndHashCode(callSuper = true)
-@JsonInclude(Include.NON_NULL)
-@Data
-@AllArgsConstructor
-@NoArgsConstructor
-public class SvBusResponse extends SvBusMessage {
-
- /**
- * Error code, 0 or null means success
- */
- private SvBusStatus status;
-
-
- @JsonIgnore
- public boolean isSuccessful() {
- return status == null || status.getCode() == 0;
- }
-}
diff --git a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvBusStatus.java b/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvBusStatus.java
deleted file mode 100644
index 91ac71f25d..0000000000
--- a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvBusStatus.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright © 2020 Apollo Foundation
- */
-package com.apollocurrency.aplwallet.apl.util.supervisor.msg;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-/**
- * Status message body on the bus
- *
- * @author alukin@gmail.com
- */
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@Data
-@AllArgsConstructor
-@NoArgsConstructor
-public class SvBusStatus {
-
- private Integer code = 0;
- private String description = "OK";
-}
diff --git a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvChannelHeader.java b/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvChannelHeader.java
deleted file mode 100644
index 6f7300afee..0000000000
--- a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvChannelHeader.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright © 2020 Apollo Foundation
- */
-package com.apollocurrency.aplwallet.apl.util.supervisor.msg;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import java.util.Date;
-
-/**
- * This class represents "envelope" header format for all messages going trough
- * messaging systems of Apollo Supervisor Null fields ignored on serializing.
- *
- * @author alukinb@gmail.conm
- */
-@JsonInclude(JsonInclude.Include.NON_NULL)
-public class SvChannelHeader {
-
- /**
- * Each message has random unique ID
- */
- public Long messageId;
- /**
- * If message is not request but response it should have this set to message
- * Id of request. If it is null, message is request or just message that
- * does not require response.
- */
- public Long inResponseTo;
- /**
- * Often we have to route request to some REST API or use publish/subscribe
- * magic for messages. Type of request or message going to this path is
- * fixed and we interpret it inside of appropriate processing routine. with
- * path parameters and request parameters
- */
- public String path;
-
- public String from;
- public String to;
- public String routedBy;
- public Date from_timestamp;
- public Date route_timestamp;
-
-}
diff --git a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvChannelMessage.java b/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvChannelMessage.java
deleted file mode 100644
index fd9a560751..0000000000
--- a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvChannelMessage.java
+++ /dev/null
@@ -1,22 +0,0 @@
-
-/*
- * Copyright © 2020 Apollo Foundation
- */
-package com.apollocurrency.aplwallet.apl.util.supervisor.msg;
-
-import lombok.AllArgsConstructor;
-import lombok.NoArgsConstructor;
-
-/**
- * This class represents "envelope" message format for all
- * messages going trough messaging systems of Apollo Supervisor
- * Null fields ignored on serializing.
- * @author alukinb@gmail.conm
- */
-@NoArgsConstructor
-@AllArgsConstructor
-public class SvChannelMessage {
- public SvChannelHeader header = new SvChannelHeader();
- public Object body;
-}
-
diff --git a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvCommandRequest.java b/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvCommandRequest.java
deleted file mode 100644
index e9f822027f..0000000000
--- a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvCommandRequest.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright © 2020 Apollo Foundation
- */
-package com.apollocurrency.aplwallet.apl.util.supervisor.msg;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import java.util.HashMap;
-
-/**
- * This class represents command request to supervisor
- *
- * @author alukin@gmail.com
- */
-@JsonInclude(JsonInclude.Include.NON_NULL)
-public class SvCommandRequest extends SvBusRequest {
-
- public String cmd;
- public HashMap params = new HashMap<>();
-}
diff --git a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvCommandResponse.java b/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvCommandResponse.java
deleted file mode 100644
index e72f4ff719..0000000000
--- a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/SvCommandResponse.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright © 2020 Apollo Foundation
- */
-package com.apollocurrency.aplwallet.apl.util.supervisor.msg;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Responce to incoming command message
- *
- * @author alukin@gmail.com
- */
-@JsonInclude(JsonInclude.Include.NON_NULL)
-public class SvCommandResponse extends SvBusResponse {
-
- public List out = new ArrayList<>();
- public List err = new ArrayList<>();
-
- public SvCommandResponse(SvBusStatus error) {
- super(error);
- }
-}
diff --git a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/UpdateMessage.java b/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/UpdateMessage.java
deleted file mode 100644
index 676e824df5..0000000000
--- a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/supervisor/msg/UpdateMessage.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Copyright © 2020 Apollo Foundation
- */
-package com.apollocurrency.aplwallet.apl.util.supervisor.msg;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-
-/**
- * Update indication message TODO: adapt it for uptater2
- *
- * @author alukin@gmail.com
- */
-@JsonInclude(JsonInclude.Include.NON_NULL)
-public class UpdateMessage extends SvBusMessage {
-
- public String version;
- public Integer priority;
-}
diff --git a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/ws/WSClient.java b/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/ws/WSClient.java
deleted file mode 100644
index 652874921a..0000000000
--- a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/ws/WSClient.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright © 2018 Apollo Foundation
- */
-package com.apollocurrency.aplwallet.apl.util.ws;
-
-import java.io.Closeable;
-import java.net.URI;
-import java.net.http.HttpClient;
-import java.net.http.WebSocket;
-import java.net.http.WebSocket.Listener;
-
-/**
- * JDK-11 and above WebSocket client without any external dependencies
- *
- * @author alukin@gmail.com
- */
-public class WSClient implements Closeable {
-
- private Listener wsListener;
- private HttpClient client;
- private WebSocket webSocket;
-
- public WebSocket getWebSocket() {
- return webSocket;
- }
-
- public WSClient(Listener wsListener) {
- this.wsListener = wsListener;
- client = HttpClient.newHttpClient();
- }
-
- /**
- * Connect to given URI
- *
- * @param uri Example: "wss://localhost:8443/wsEndpoint"
- * @return true if connected
- */
- public boolean connect(String uri) {
- boolean res = false;
- webSocket = client.newWebSocketBuilder()
- .buildAsync(URI.create(uri), wsListener)
- .join();
- return !webSocket.isInputClosed();
- }
-
- public void sendText(String text) {
- webSocket.sendText(text, true);
- }
-
- @Override
- public void close() {
- webSocket.sendClose(WebSocket.NORMAL_CLOSURE, "ok");
- }
-}
diff --git a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/ws/WSListener.java b/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/ws/WSListener.java
deleted file mode 100644
index 361d59bbe7..0000000000
--- a/apl-utils/src/main/java/com/apollocurrency/aplwallet/apl/util/ws/WSListener.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright © 2018 Apollo Foundation
- */
-package com.apollocurrency.aplwallet.apl.util.ws;
-
-import java.net.http.WebSocket;
-import java.net.http.WebSocket.Listener;
-import java.util.concurrent.CompletionStage;
-
-/**
- * Simple web socket listener to work with Apl Supervisor protocol
- *
- * @author alukin@gmail.com
- */
-public class WSListener implements Listener {
-
- @Override
- public CompletionStage> onText(WebSocket webSocket,
- CharSequence data, boolean last) {
-
- System.out.println("onText: " + data);
-
- return Listener.super.onText(webSocket, data, last);
- }
-
- @Override
- public void onOpen(WebSocket webSocket) {
- System.out.println("onOpen");
- Listener.super.onOpen(webSocket);
- }
-
- @Override
- public CompletionStage> onClose(WebSocket webSocket, int statusCode,
- String reason) {
- System.out.println("onClose: " + statusCode + " " + reason);
- return Listener.super.onClose(webSocket, statusCode, reason);
- }
-}
diff --git a/apl-utils/src/test/java/com/apollocurrency/aplwallet/apl/util/cert/ApolloCertificateTest.java b/apl-utils/src/test/java/com/apollocurrency/aplwallet/apl/util/cert/ApolloCertificateTest.java
deleted file mode 100644
index 4ed1491d58..0000000000
--- a/apl-utils/src/test/java/com/apollocurrency/aplwallet/apl/util/cert/ApolloCertificateTest.java
+++ /dev/null
@@ -1,189 +0,0 @@
-package com.apollocurrency.aplwallet.apl.util.cert;
-
-import com.apollocurrency.aplwallet.apl.crypto.cert.ApolloCertificate;
-import com.apollocurrency.aplwallet.apl.crypto.cert.ApolloCertificateException;
-import com.apollocurrency.aplwallet.apl.crypto.cert.AuthorityID;
-import com.apollocurrency.aplwallet.apl.crypto.cert.CertAttributes;
-import io.firstbridge.cryptolib.CryptoConfig;
-import io.firstbridge.cryptolib.CryptoParams;
-import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.api.Test;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.math.BigInteger;
-import java.util.Date;
-import java.util.List;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-/**
- * @author alukin@gmail.com
- */
-public class ApolloCertificateTest {
-
- private static final CryptoParams params = CryptoConfig.createDefaultParams();
- private static final org.slf4j.Logger log = LoggerFactory.getLogger(ApolloCertificateTest.class);
- static ApolloCertificate acert;
-
- public ApolloCertificateTest() {
- }
-
- @BeforeAll
- public static void setUpClass() {
- try (InputStream is = ApolloCertificateTest.class.getClassLoader().getResourceAsStream("test_cert.pem")) {
- acert = ApolloCertificate.loadPEMFromStream(is);
- } catch (IOException ex) {
- log.error("Can not load test certificate ", ex);
- } catch (ApolloCertificateException ex) {
- log.error("can not parse test certificate", ex);
- }
- }
-
- /**
- * Test of getAuthorityId method, of class ApolloCertificate.
- */
- @Test
- public void testGetAuthorityId() {
- AuthorityID result = acert.getAuthorityId();
- assertEquals(5139, result.getActorType());
- }
-
- /**
- * Test of getCN method, of class ApolloCertificate.
- */
- @Test
- public void testGetCN() {
- String result = acert.getCN();
- assertEquals("al.cn.ua", result);
- }
-
- /**
- * Test of getOrganization method, of class ApolloCertificate.
- */
- @Test
- public void testGetOrganization() {
- String expResult = "FirstBridge";
- String result = acert.getOrganization();
- assertEquals(expResult, result);
- }
-
- /**
- * Test of getOrganizationUnit method, of class ApolloCertificate.
- */
- @Test
- public void testGetOrganizationUnit() {
- String expResult = "FB-cn";
- String result = acert.getOrganizationUnit();
- assertEquals(expResult, result);
- }
-
- /**
- * Test of getCountry method, of class ApolloCertificate.
- */
- @Test
- public void testGetCountry() {
- String expResult = "UA";
- String result = acert.getCountry();
- assertEquals(expResult, result);
- }
-
- /**
- * Test of getCity method, of class ApolloCertificate.
- */
- @Test
- public void testGetCity() {
- String expResult = "Chernigiv";
- String result = acert.getCity();
- assertEquals(expResult, result);
- }
-
- /**
- * Test of getCertificatePurpose method, of class ApolloCertificate.
- */
- @Test
- public void testGetCertificatePurpose() {
- String expResult = "Node";
- String result = acert.getCertificatePurpose();
- assertEquals(expResult, result);
- }
-
- /**
- * Test of getIPAddresses method, of class ApolloCertificate.
- */
- @Test
- public void testGetIPAddresses() {
- List expResult = null;
- List result = acert.getIPAddresses();
- assertEquals(expResult, result);
- }
-
- /**
- * Test of getDNSNames method, of class ApolloCertificate.
- */
- @Test
- public void testGetDNSNames() {
- List expResult = null;
- List result = acert.getDNSNames();
- assertEquals(expResult, result);
- }
-
- /**
- * Test of getStateOrProvince method, of class ApolloCertificate.
- */
- @Test
- public void testGetStateOrProvince() {
- String expResult = null;
- String result = acert.getStateOrProvince();
- assertEquals(expResult, result);
- }
-
- /**
- * Test of getEmail method, of class ApolloCertificate.
- */
- @Test
- public void testGetEmail() {
- String expResult = "alukin@gmail.com";
- String result = acert.getEmail();
- assertEquals(expResult, result);
- }
-
- /**
- * Test of getPEM method, of class ApolloCertificate.
- */
- @Test
- public void testGetPEM() {
- String result = acert.getPEM();
- assertEquals(true, result.startsWith("-----BEGIN CERTIFICATE----"));
- }
-
- /**
- * Test of isValid method, of class ApolloCertificate.
- */
- @Test
- public void testIsValid() {
- Date date = null;
- boolean expResult = false;
- boolean result = acert.isValid(date);
- assertEquals(expResult, result);
- }
-
- /**
- * Test of getSerial method, of class ApolloCertificate.
- */
- @Test
- public void testGetSerial() {
- BigInteger result = acert.getSerial();
- BigInteger expResult = BigInteger.valueOf(1582313240538L);
- assertEquals(expResult, result);
- }
-
- @Test
- public void testGetIssuerAttributes() {
- CertAttributes cert_attr = acert.getIssuerAttrinutes();
- assertEquals("al.cn.ua", cert_attr.getCn());
- assertEquals("FirstBridge", cert_attr.getO());
- }
-
-}
diff --git a/apl-utils/src/test/java/com/apollocurrency/aplwallet/apl/util/env/dirprovider/ConfigDirProviderTest.java b/apl-utils/src/test/java/com/apollocurrency/aplwallet/apl/util/env/dirprovider/ConfigDirProviderTest.java
index 8eeaf7948c..6aa599706d 100644
--- a/apl-utils/src/test/java/com/apollocurrency/aplwallet/apl/util/env/dirprovider/ConfigDirProviderTest.java
+++ b/apl-utils/src/test/java/com/apollocurrency/aplwallet/apl/util/env/dirprovider/ConfigDirProviderTest.java
@@ -23,7 +23,7 @@ public class ConfigDirProviderTest {
= System.getProperty("user.home") + File.separator + "." + APPLICATION_NAME + File.separator + "conf";
public static final String INSTALLATION_CONFIG_DIR = getInstallationConfigDir();
- public static final String SYSTEM_CONFIG_DIR = "/etc/" + APPLICATION_NAME + "/conf";
+ public static final String SYSTEM_CONFIG_DIR = "/etc/" + APPLICATION_NAME + File.separator + "conf";
private static String getInstallationConfigDir() {
try {
diff --git a/apl-utils/src/test/java/com/apollocurrency/aplwallet/apl/util/supervisor/client/impl/PathSpecificationTest.java b/apl-utils/src/test/java/com/apollocurrency/aplwallet/apl/util/supervisor/client/impl/PathSpecificationTest.java
deleted file mode 100644
index 5a4bf91865..0000000000
--- a/apl-utils/src/test/java/com/apollocurrency/aplwallet/apl/util/supervisor/client/impl/PathSpecificationTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
-package com.apollocurrency.aplwallet.apl.util.supervisor.client.impl;
-
-import java.util.Map;
-import org.junit.jupiter.api.Test;
-import static org.junit.jupiter.api.Assertions.*;
-
-/**
- *
- * @author al
- */
-public class PathSpecificationTest {
-
- public PathSpecificationTest() {
- }
-
-
- /**
- * Test of fromSpecString method, of class PathSpecification.
- */
- @Test
- public void testFromSpecString() {
- String pathSpec1 = "/test/one/{param1}/{param2}";
- PathSpecification result1 = PathSpecification.fromSpecString(pathSpec1);
-
- assertEquals("/test/one", result1.prefix);
- assertEquals("param1", result1.paramNames.get(0));
- assertEquals("param2", result1.paramNames.get(1));
-
- String pathSpec2 = "/test/two/one";
- PathSpecification result2 = PathSpecification.fromSpecString(pathSpec2);
-
- assertEquals("/test/two/one", result2.prefix);
- assertEquals(0, result2.paramNames.size());
-
- String pathSpec3 = "/test/one/{param1/{param2}";
- PathSpecification result3 = PathSpecification.fromSpecString(pathSpec3);
-
- assertEquals("/test/one", result3.prefix);
- assertEquals("param1", result3.paramNames.get(0));
- assertEquals("param2", result3.paramNames.get(1));
- }
-
- /**
- * Test of matches method, of class PathSpecification.
- */
- @Test
- public void testMatches() {
- String pathSpec = "/test/one/{param1}/{param2}";
- PathSpecification ps = PathSpecification.fromSpecString(pathSpec);
- boolean result1 = ps.matches("/test/one/1");
- assertEquals(true,result1);
- boolean result2 = ps.matches("/test/one/1/2/3");
- assertEquals(true,result2);
- }
-
- /**
- * Test of parseParams method, of class PathSpecification.
- */
- @Test
- public void testParseParams() {
- String pathSpec = "/test/one/{param1}/{param2}";
- PathSpecification ps = PathSpecification.fromSpecString(pathSpec);
- Map params = ps.parseParams("/test/one/1");
- assertEquals("1", params.get("param1"));
- assertEquals(null, params.get("param2"));
-
- Map params1 = ps.parseParams("/test/one/1/2");
- assertEquals("1", params1.get("param1"));
- assertEquals("2", params1.get("param2"));
-
- Map params2 = ps.parseParams("test/one/1/2");
- assertEquals("1", params1.get("param1"));
- assertEquals("2", params1.get("param2"));
- }
-
-}
diff --git a/apl-utils/src/test/resources/test_cert.pem b/apl-utils/src/test/resources/test_cert.pem
deleted file mode 100644
index 3e67d7af97..0000000000
--- a/apl-utils/src/test/resources/test_cert.pem
+++ /dev/null
@@ -1,23 +0,0 @@
------BEGIN CERTIFICATE-----
-MIID5TCCA0agAwIBAgIGAXBpN/faMAoGCCqGSM49BAMEMIIBBDERMA8GA1UEAwwI
-YWwuY24udWExEjAQBgNVBAcMCUNoZXJuaWdpdjEUMBIGA1UECgwLRmlyc3RCcmlk
-Z2UxLzAtBgoJkiaJk/IsZAEBDB8wMDAyZGEwZTMyZTA3YjYxYzlmMDI1MWZlNjI3
-YTljMSkwJwYDVQQFEyAwMDAxZjFmY2Y4MmQxMzJmOWJiMDE4Y2E2NzM4YTE5ZjEO
-MAwGA1UECwwFRkItY24xHzAdBgkqhkiG9w0BCQEWEGFsdWtpbkBnbWFpbC5jb20x
-CzAJBgNVBAYTAlVBMSswKQYDVQQPDCIxNTE0MTMxMjExMTAwOTA4MDYwNzA2MDUw
-NDAzMDIwMTAwMB4XDTIwMDIyMDE5MjcyMFoXDTIwMDIwNjAzNDUzMVowggEEMREw
-DwYDVQQDDAhhbC5jbi51YTESMBAGA1UEBwwJQ2hlcm5pZ2l2MRQwEgYDVQQKDAtG
-aXJzdEJyaWRnZTEvMC0GCgmSJomT8ixkAQEMHzAwMDJkYTBlMzJlMDdiNjFjOWYw
-MjUxZmU2MjdhOWMxKTAnBgNVBAUTIDAwMDFmMWZjZjgyZDEzMmY5YmIwMThjYTY3
-MzhhMTlmMQ4wDAYDVQQLDAVGQi1jbjEfMB0GCSqGSIb3DQEJARYQYWx1a2luQGdt
-YWlsLmNvbTELMAkGA1UEBhMCVUExKzApBgNVBA8MIjE1MTQxMzEyMTExMDA5MDgw
-NjA3MDYwNTA0MDMwMjAxMDAwgZswEAYHKoZIzj0CAQYFK4EEACMDgYYABAHDReX2
-jACnMlMwzEfrIqCD4UGRVJwQ3fi0UzayDAmWjrZ0pXqmcvI0DVBZfYHVJOhuD4za
-bk8rusgKGESMqPDJjAH4Tq66MCk7eMpmiDlUg3nzBZ/IX57Iihph0vwyf+cc4SUC
-H/9b1pUUL2XR6Ibhf6d91HunEIecbEv0AL4QvdjFJqNdMFswDgYDVR0PAQH/BAQD
-AgSQMCoGA1UdJQEB/wQgMB4GCCsGAQUFBwMDBggrBgEFBQcDCAYIKwYBBQUHAwQw
-DwYDVR0TAQH/BAUwAwEB/zAMBgNVHREBAf8EAjAAMAoGCCqGSM49BAMEA4GMADCB
-iAJCALefzX2CR1Xog4sfb+6W5yNw9W/81uvFARF7dD0lE/eQVM+0vz/Fq74GGzao
-bpsSO4YzEG0GGYFmotaPMQKnCoxaAkIBkGiNy4vggD47S+fEHNrUDrqiAFuTg3LW
-Vl2S882/PjG9J0HSWv2d53xqOGDxR/RV6LjLrVxbSI9P49YNbGtpRLw=
------END CERTIFICATE-----
diff --git a/apl-utils/src/test/resources/test_cert_pvtkey.pem b/apl-utils/src/test/resources/test_cert_pvtkey.pem
deleted file mode 100644
index 422f918ec1..0000000000
--- a/apl-utils/src/test/resources/test_cert_pvtkey.pem
+++ /dev/null
@@ -1,8 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIH3AgEAMBAGByqGSM49AgEGBSuBBAAjBIHfMIHcAgEBBEIBwfyQxUSPOpP/hno2
-GS9e+yJFCcGUCpTNMHlQQbOKgwOspAiRSSNt1jzoRW6j0Fo++Z04wSrFWJA0wsvH
-6XU3khugBwYFK4EEACOhgYkDgYYABAHDReX2jACnMlMwzEfrIqCD4UGRVJwQ3fi0
-UzayDAmWjrZ0pXqmcvI0DVBZfYHVJOhuD4zabk8rusgKGESMqPDJjAH4Tq66MCk7
-eMpmiDlUg3nzBZ/IX57Iihph0vwyf+cc4SUCH/9b1pUUL2XR6Ibhf6d91HunEIec
-bEv0AL4QvdjFJg==
------END PRIVATE KEY-----
diff --git a/apl-vault-wallet/src/main/resources/META-INF/beans.xml b/apl-vault-wallet/src/main/resources/META-INF/beans.xml
index 542bd53ab6..0178091e87 100644
--- a/apl-vault-wallet/src/main/resources/META-INF/beans.xml
+++ b/apl-vault-wallet/src/main/resources/META-INF/beans.xml
@@ -1,5 +1,14 @@
\ No newline at end of file
+ version="1.1" bean-discovery-mode="all">
+
+ org.jboss.weld.environment.se.threading.RunnableDecorator
+
+
+
+
+
+
\ No newline at end of file
diff --git a/conf/CA-certs/ApolloWallet-root.crt b/conf/CA-certs/ApolloWallet-root.crt
new file mode 100644
index 0000000000..ba321bdbd4
--- /dev/null
+++ b/conf/CA-certs/ApolloWallet-root.crt
@@ -0,0 +1,30 @@
+-----BEGIN CERTIFICATE-----
+MIIFMjCCBJOgAwIBAgIIEL8TEjSqgtkwCgYIKoZIzj0EAwQwggFCMQswCQYDVQQG
+EwJVUzELMAkGA1UECBMCTUkxFTATBgNVBAcTDE1vdW50IFZlcm5vbjEZMBcGA1UE
+ChMQQXBvbGxvV2FsbGV0Lm9yZzENMAsGA1UECxMEQ2VydDEeMBwGA1UEAxMVUm9v
+dC5BcG9sbG93YWxsZXQub3JnMSQwIgYJKoZIhvcNAQkBFhVjZXJ0QGFwb2xsb3dh
+bGxldC5vcmcxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJNSTEVMBMGA1UEBxMMTW91
+bnQgVmVybm9uMRkwFwYDVQQKExBBcG9sbG9XYWxsZXQub3JnMQ0wCwYDVQQLEwRD
+ZXJ0MR4wHAYDVQQDExVSb290LkFwb2xsb1dhbGxldC5vcmcxJDAiBgkqhkiG9w0B
+CQEWFWNlcnRAYXBvbGxvd2FsbGV0Lm9yZzAeFw0yMDA5MDUxODI2MDBaFw00MDA5
+MDUxODI2MDBaMIIBQjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1JMRUwEwYDVQQH
+EwxNb3VudCBWZXJub24xGTAXBgNVBAoTEEFwb2xsb1dhbGxldC5vcmcxDTALBgNV
+BAsTBENlcnQxHjAcBgNVBAMTFVJvb3QuQXBvbGxvd2FsbGV0Lm9yZzEkMCIGCSqG
+SIb3DQEJARYVY2VydEBhcG9sbG93YWxsZXQub3JnMQswCQYDVQQGEwJVUzELMAkG
+A1UECBMCTUkxFTATBgNVBAcTDE1vdW50IFZlcm5vbjEZMBcGA1UEChMQQXBvbGxv
+V2FsbGV0Lm9yZzENMAsGA1UECxMEQ2VydDEeMBwGA1UEAxMVUm9vdC5BcG9sbG9X
+YWxsZXQub3JnMSQwIgYJKoZIhvcNAQkBFhVjZXJ0QGFwb2xsb3dhbGxldC5vcmcw
+gZswEAYHKoZIzj0CAQYFK4EEACMDgYYABAAVG2rKuZhN4YkbUcg910pXCjxEBtVQ
+5XzcI4fnLDRm0BV1Lea8iwj8spY+V4SEtwbzV3yYfNt6SUiQuaXB9JER1QEgikea
+01J6vrooEesu9iIf30UV1+s6bcQ8eqMZRjqyP/0PpRyJhswoSCosJlo9Cb9rzOQg
+p1G0A+UVpxLpWRbm+qOCASowggEmMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE
+FN25ljt/mV1xBsZpFuKyBHUKFNnPMB8GA1UdIwQYMBaAFN25ljt/mV1xBsZpFuKy
+BHUKFNnPMA4GA1UdDwEB/wQEAwIBBjAgBgNVHSUBAf8EFjAUBggrBgEFBQcDAwYI
+KwYBBQUHAwkwIAYDVR0RBBkwF4IVUm9vdC5BcG9sbG93YWxsZXQub3JnMCUGA1Ud
+EgQeMByCGlJvb3QuY2VydC5BcG9sbG93YWxsZXQub3JnMCUGA1UdHwQeMBwwGqAY
+oBaCFGNybC5hcG9sbG93YWxsZXQub3JnMBEGCWCGSAGG+EIBAQQEAwIABzAeBglg
+hkgBhvhCAQ0EERYPeGNhIGNlcnRpZmljYXRlMAoGCCqGSM49BAMEA4GMADCBiAJC
+ATllB6P+gtdryutXwe5yKVvGwJyFZ++M4P0s/lhBcRJPX1ESEnGN6U/XBssaDFR6
+l07jGJxutBY+Tt5s81H7sxD+AkIBEk0Y/UfUqJor3WHc/D5TNkChfvppgh8PCZyT
+3E3o8Gw1/64nDAUyNoUzoElTDfFei8KkC+bA+zjx1MQicGM7ZAY=
+-----END CERTIFICATE-----