ClientServer (py4j-java 0.10.0 API)
Date: 2016-04-18

py4j

## Class ClientServer

- java.lang.Object
- - py4j.ClientServer

-     public class ClientServer
      extends java.lang.Object

  This class creates the JavaServer and the PythonClient necessary to communicate with a Python virtual machine with the new threading model.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.logging.Logger` | `logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientServer(int javaPort, java.net.InetAddress javaAddress, int pythonPort, java.net.InetAddress pythonAddress, int connectTimeout, int readTimeout, javax.net.ServerSocketFactory sSocketFactory, javax.net.SocketFactory socketFactory, java.lang.Object entryPoint)`
    `ClientServer(java.lang.Object entryPoint)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Py4JJavaServer` | `getJavaServer()`
    `Py4JPythonClient` | `getPythonClient()`
    `java.lang.Object` | `getPythonServerEntryPoint(java.lang.Class[] interfacesToImplement)` Gets a reference to the entry point on the Python side.
    `void` | `shutdown()` Shuts down the Java Server so that it stops accepting requests and it closes existing connections.
    `void` | `startServer(boolean fork)` Starts the JavaServer, which will handle requests from the Python side.

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

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

- - ### Field Detail

    - #### logger

          protected final java.util.logging.Logger logger

  - ### Constructor Detail

    - #### ClientServer

          public ClientServer(java.lang.Object entryPoint)

      Parameters:
        `entryPoint` -

    - #### ClientServer

          public ClientServer(int javaPort,
                              java.net.InetAddress javaAddress,
                              int pythonPort,
                              java.net.InetAddress pythonAddress,
                              int connectTimeout,
                              int readTimeout,
                              javax.net.ServerSocketFactory sSocketFactory,
                              javax.net.SocketFactory socketFactory,
                              java.lang.Object entryPoint)

      Parameters:
        `javaPort` -
        `javaAddress` -
        `pythonPort` -
        `pythonAddress` -
        `connectTimeout` -
        `readTimeout` -
        `sSocketFactory` -
        `socketFactory` -
        `entryPoint` -

  - ### Method Detail

    - #### getJavaServer

          public Py4JJavaServer getJavaServer()

    - #### getPythonClient

          public Py4JPythonClient getPythonClient()

    - #### startServer

          public void startServer(boolean fork)

      Starts the JavaServer, which will handle requests from the Python side.

      Parameters:
        `fork` - If the JavaServer is started in this thread or in its own thread.

    - #### shutdown

          public void shutdown()

      Shuts down the Java Server so that it stops accepting requests and it closes existing connections.

    - #### getPythonServerEntryPoint

          public java.lang.Object getPythonServerEntryPoint(java.lang.Class[] interfacesToImplement)

      Gets a reference to the entry point on the Python side. This is often necessary if Java is driving the communication because Java cannot call static methods, initialize Python objects or load Python modules yet.

      Parameters:
        `interfacesToImplement` -
      Returns: