If communication type is unix socket then use rest server factory.
Ported logic from factory into launcher as is more appropriate here.
package com.quorum.tessera;
import com.quorum.tessera.config.AppType;
+import com.quorum.tessera.config.CommunicationType;
import com.quorum.tessera.config.Config;
import com.quorum.tessera.config.ServerConfig;
import com.quorum.tessera.config.cli.CliDelegate;
@@ -96,7 +97,20 @@ public class Launcher {
//Enclave server config means the enclave server is remote.
continue;
}
- TesseraServerFactory serverFactory = TesseraServerFactory.create(serverConfig.getCommunicationType());
+
+ CommunicationType commType = serverConfig.getCommunicationType();
+ CommunicationType communicationType;
+ if (commType == CommunicationType.UNIX_SOCKET) {
+
+ LOGGER.warn("UNIX_SOCKET communication type is deprecated it will "
+ + "be removed for furture releases. "
+ + "Use REST commnications type with UnixServerSocket serverSocket");
+ communicationType = CommunicationType.REST;
+ } else {
+ communicationType = commType;
+ }
+
+ TesseraServerFactory serverFactory = TesseraServerFactory.create(communicationType);
TesseraServer tesseraServer = serverFactory.createServer(serverConfig, services);
if (null != tesseraServer) {
