public interface Py4JJavaServer
Interface that describes the operations a server must support to receive requests from the Python side.
Modifier and Type | Method and Description |
---|---|
void |
addListener(GatewayServerListener listener) |
java.net.InetAddress |
getAddress() |
Gateway |
getGateway() |
java.util.List<GatewayServerListener> |
getListeners() |
int |
getListeningPort() |
int |
getPort() |
java.net.InetAddress |
getPythonAddress() |
int |
getPythonPort() |
void |
removeListener(GatewayServerListener listener) |
void |
shutdown()
Stops accepting connections, closes all current connections, and calls
Gateway.shutdown() |
void |
shutdown(boolean shutdownCallbackClient)
Stops accepting connections, closes all current connections, and calls
Gateway.shutdown() |
void |
start()
Starts to accept connections in a second thread (non-blocking call).
|
void |
start(boolean fork)
Starts to accept connections.
|
java.util.List<GatewayServerListener> getListeners()
java.net.InetAddress getAddress()
Gateway getGateway()
int getListeningPort()
int getPort()
java.net.InetAddress getPythonAddress()
int getPythonPort()
void removeListener(GatewayServerListener listener)
void shutdown()
Stops accepting connections, closes all current connections, and calls
Gateway.shutdown()
void shutdown(boolean shutdownCallbackClient)
Stops accepting connections, closes all current connections, and calls
Gateway.shutdown()
shutdownCallbackClient
- If True, shuts down the CallbackClient
instance.void addListener(GatewayServerListener listener)
void start()
Starts to accept connections in a second thread (non-blocking call).
void start(boolean fork)
Starts to accept connections.
fork
- If true, the GatewayServer accepts connection in another
thread and this call is non-blocking. If False, the
GatewayServer accepts connection in this thread and the call
is blocking (until the Gateway is shutdown by another thread).Py4JNetworkException
- If the server socket cannot start.