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

py4j

## Class CallbackConnection

- java.lang.Object
- - py4j.CallbackConnection

- All Implemented Interfaces:
    Py4JClientConnection

      public class CallbackConnection
      extends java.lang.Object
      implements Py4JClientConnection

  Default implementation of the CommunicationChannel interface using TCP sockets.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_NONBLOCKING_SO_TIMEOUT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CallbackConnection(int port, java.net.InetAddress address)`
    `CallbackConnection(int port, java.net.InetAddress address, javax.net.SocketFactory socketFactory)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.lang.String` | `readBlockingResponse(java.io.BufferedReader reader)`
    `protected java.lang.String` | `readNonBlockingResponse(java.net.Socket socket, java.io.BufferedReader reader)`
    `java.lang.String` | `sendCommand(java.lang.String command)`
    `java.lang.String` | `sendCommand(java.lang.String command, boolean blocking)`
    `void` | `setUsed(boolean used)`
    `void` | `shutdown()`
    `void` | `start()`
    `boolean` | `wasUsed()`

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

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

- - ### Field Detail

    - #### DEFAULT_NONBLOCKING_SO_TIMEOUT

          public static final int DEFAULT_NONBLOCKING_SO_TIMEOUT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### CallbackConnection

          public CallbackConnection(int port,
                                    java.net.InetAddress address)

    - #### CallbackConnection

          public CallbackConnection(int port,
                                    java.net.InetAddress address,
                                    javax.net.SocketFactory socketFactory)

  - ### Method Detail

    - #### sendCommand

          public java.lang.String sendCommand(java.lang.String command)

      Specified by:
        `sendCommand` in interface `Py4JClientConnection`

    - #### sendCommand

          public java.lang.String sendCommand(java.lang.String command,
                                              boolean blocking)

      Specified by:
        `sendCommand` in interface `Py4JClientConnection`

    - #### readBlockingResponse

          protected java.lang.String readBlockingResponse(java.io.BufferedReader reader)
                                                   throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### readNonBlockingResponse

          protected java.lang.String readNonBlockingResponse(java.net.Socket socket,
                                                             java.io.BufferedReader reader)
                                                      throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### setUsed

          public void setUsed(boolean used)

      Specified by:
        `setUsed` in interface `Py4JClientConnection`

    - #### shutdown

          public void shutdown()

      Specified by:
        `shutdown` in interface `Py4JClientConnection`

    - #### start

          public void start()
                     throws java.io.IOException

      Specified by:
        `start` in interface `Py4JClientConnection`
      Throws:
        `java.io.IOException`

    - #### wasUsed

          public boolean wasUsed()

      Specified by:
        `wasUsed` in interface `Py4JClientConnection`