Package py4j
Class GatewayServer.GatewayServerBuilder
java.lang.Object
py4j.GatewayServer.GatewayServerBuilder
- Enclosing class:
- GatewayServer
Helper class to make it easier and self-documenting how a
GatewayServer
is constructed.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAuthentication token that clients must provide to the server when connecting.build()
Builds a GatewayServer instance using the provided parameters.callbackClient
(int pythonPort, InetAddress pythonAddress) callbackClient
(int pythonPort, InetAddress pythonAddress, String authToken) Set up the callback client to talk to the server running at the given address and port, authenticating with the given token.callbackClient
(CallbackClient callbackClient) connectTimeout
(int connectTimeout) customCommands
(List<Class<? extends Command>> customCommands) entryPoint
(Object entryPoint) javaAddress
(InetAddress javaAddress) javaPort
(int javaPort) readTimeout
(int readTimeout) serverSocketFactory
(ServerSocketFactory serverSocketFactory)
-
Constructor Details
-
GatewayServerBuilder
public GatewayServerBuilder() -
GatewayServerBuilder
-
-
Method Details
-
build
Builds a GatewayServer instance using the provided parameters. If gateway is provided, some parameters will be ignored (callbackClient and entryPoint).
- Returns:
-
gateway
-
javaPort
-
javaAddress
-
callbackClient
-
callbackClient
public GatewayServer.GatewayServerBuilder callbackClient(int pythonPort, InetAddress pythonAddress, String authToken) Set up the callback client to talk to the server running at the given address and port, authenticating with the given token. If the token is null, no authentication will be attempted. -
callbackClient
-
connectTimeout
-
readTimeout
-
serverSocketFactory
public GatewayServer.GatewayServerBuilder serverSocketFactory(ServerSocketFactory serverSocketFactory) -
entryPoint
-
customCommands
public GatewayServer.GatewayServerBuilder customCommands(List<Class<? extends Command>> customCommands) -
authToken
Authentication token that clients must provide to the server when connecting. If null, authentication is disabled.
-