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;
}