private ClientServer(int javaPort, InetAddress javaAddress, int pythonPort, InetAddress pythonAddress, int connectTimeout, int readTimeout, ServerSocketFactory sSocketFactory, SocketFactory socketFactory, Object entryPoint, boolean autoStartJavaServer, boolean enableMemoryManagement, String authToken) { this.javaPort = javaPort; this.javaAddress = javaAddress; this.pythonPort = pythonPort; this.pythonAddress = pythonAddress; this.connectTimeout = connectTimeout; this.readTimeout = readTimeout; this.sSocketFactory = sSocketFactory; this.socketFactory = socketFactory; this.enableMemoryManagement = enableMemoryManagement; this.authToken = authToken; this.pythonClient = createPythonClient(); this.javaServer = createJavaServer(entryPoint, pythonClient); this.gateway = javaServer.getGateway(); pythonClient.setGateway(gateway); pythonClient.setJavaServer(javaServer); this.autoStartJavaServer = autoStartJavaServer; if (autoStartJavaServer) { this.javaServer.start(); } else { this.gateway.startup(); } }