GatewayServer.GatewayServerBuilder (py4j-java 0.10.9.4 API)
Date: 2022-03-16

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 a `GatewayServer` is constructed.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GatewayServerBuilder()`
    `GatewayServerBuilder(java.lang.Object entryPoint)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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(CallbackClient callbackClient)`
    `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` | `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)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GatewayServerBuilder

          public GatewayServerBuilder()

    - #### GatewayServerBuilder

          public GatewayServerBuilder(java.lang.Object entryPoint)

  - ### 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.