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