py4j

## Class CallbackConnection

- java.lang.Object
- - py4j.CallbackConnection

-     public class CallbackConnection
      extends Object

  Default implementation of the CommunicationChannel interface using TCP sockets.

  Author:
    Barthelemy Dagenais

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CallbackConnection(int port, InetAddress address)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected String` | `readBlockingResponse(BufferedReader reader)`
    `protected String` | `readNonBlockingResponse(Socket socket, BufferedReader reader)`
    `String` | `sendCommand(String command)`
    `String` | `sendCommand(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`

- - ### Constructor Detail

    - #### CallbackConnection

          public CallbackConnection(int port,
                                    InetAddress address)

  - ### Method Detail

    - #### sendCommand

          public String sendCommand(String command)

    - #### sendCommand

          public String sendCommand(String command,
                                    boolean blocking)

    - #### readBlockingResponse

          protected String readBlockingResponse(BufferedReader reader)
                                         throws IOException

      Throws:
        `IOException`

    - #### readNonBlockingResponse

          protected String readNonBlockingResponse(Socket socket,
                                                   BufferedReader reader)
                                            throws IOException

      Throws:
        `IOException`

    - #### setUsed

          public void setUsed(boolean used)

    - #### shutdown

          public void shutdown()

    - #### start

          public void start()
                     throws IOException

      Throws:
        `IOException`

    - #### wasUsed

          public boolean wasUsed()