Package py4j
Class GatewayServer.GatewayServerBuilder
- java.lang.Object
-
- py4j.GatewayServer.GatewayServerBuilder
-
- Enclosing class:
- GatewayServer
public static class GatewayServer.GatewayServerBuilder extends java.lang.ObjectHelper class to make it easier and self-documenting how aGatewayServeris 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.GatewayServerBuilderauthToken(java.lang.String authToken)Authentication token that clients must provide to the server when connecting.GatewayServerbuild()Builds a GatewayServer instance using the provided parameters.GatewayServer.GatewayServerBuildercallbackClient(int pythonPort, java.net.InetAddress pythonAddress)GatewayServer.GatewayServerBuildercallbackClient(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.GatewayServerBuildercallbackClient(CallbackClient callbackClient)GatewayServer.GatewayServerBuilderconnectTimeout(int connectTimeout)GatewayServer.GatewayServerBuildercustomCommands(java.util.List<java.lang.Class<? extends Command>> customCommands)GatewayServer.GatewayServerBuilderentryPoint(java.lang.Object entryPoint)GatewayServer.GatewayServerBuildergateway(Gateway gateway)GatewayServer.GatewayServerBuilderjavaAddress(java.net.InetAddress javaAddress)GatewayServer.GatewayServerBuilderjavaPort(int javaPort)GatewayServer.GatewayServerBuilderreadTimeout(int readTimeout)GatewayServer.GatewayServerBuilderserverSocketFactory(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.
-
-