/** * Updates the python callback port in the {@link GatewayServer}. */ public static void setGatewayCallbackPort(GatewayServer gatewayServer, int port) { gatewayServer.resetCallbackClient(gatewayServer.getCallbackClient().getAddress(), port); }
/** * Updates the python callback port in the {@link GatewayServer}. */ public static void setGatewayCallbackPort(GatewayServer gatewayServer, int port) { gatewayServer.resetCallbackClient(gatewayServer.getCallbackClient().getAddress(), port); }
GatewayServer(Object entryPoint, int port, InetAddress address, int connectTimeout, int readTimeout, List<Class<? extends Command>> customCommands, Py4JPythonClient cbClient, ServerSocketFactory sSocketFactory, String authToken) { super(); this.port = port; this.address = address; this.connectTimeout = connectTimeout; this.readTimeout = readTimeout; this.gateway = new Gateway(entryPoint, cbClient); this.pythonPort = cbClient.getPort(); this.pythonAddress = cbClient.getAddress(); this.gateway.putObject(GATEWAY_SERVER_ID, this); if (customCommands != null) { this.customCommands = customCommands; } else { this.customCommands = new ArrayList<Class<? extends Command>>(); } this.listeners = new CopyOnWriteArrayList<GatewayServerListener>(); this.sSocketFactory = sSocketFactory; this.authToken = authToken; }
private GatewayServer(Gateway gateway, int port, InetAddress address, int connectTimeout, int readTimeout, List<Class<? extends Command>> customCommands, ServerSocketFactory sSocketFactory, String authToken) { super(); this.port = port; this.address = address; this.connectTimeout = connectTimeout; this.readTimeout = readTimeout; this.gateway = gateway; this.pythonPort = gateway.getCallbackClient().getPort(); this.pythonAddress = gateway.getCallbackClient().getAddress(); this.gateway.putObject(GATEWAY_SERVER_ID, this); if (customCommands != null) { this.customCommands = customCommands; } else { this.customCommands = new ArrayList<Class<? extends Command>>(); } this.listeners = new CopyOnWriteArrayList<GatewayServerListener>(); this.sSocketFactory = sSocketFactory; this.authToken = authToken; }