public class CallbackConnection extends java.lang.Object implements Py4JClientConnection
Default implementation of the CommunicationChannel interface using TCP sockets.
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_NONBLOCKING_SO_TIMEOUT |
| Constructor and Description |
|---|
CallbackConnection(int port,
java.net.InetAddress address) |
CallbackConnection(int port,
java.net.InetAddress address,
javax.net.SocketFactory socketFactory) |
| 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() |
public static final int DEFAULT_NONBLOCKING_SO_TIMEOUT
public CallbackConnection(int port,
java.net.InetAddress address)
public CallbackConnection(int port,
java.net.InetAddress address,
javax.net.SocketFactory socketFactory)
public java.lang.String sendCommand(java.lang.String command)
sendCommand in interface Py4JClientConnectionpublic java.lang.String sendCommand(java.lang.String command,
boolean blocking)
sendCommand in interface Py4JClientConnectionprotected java.lang.String readBlockingResponse(java.io.BufferedReader reader)
throws java.io.IOException
java.io.IOExceptionprotected java.lang.String readNonBlockingResponse(java.net.Socket socket,
java.io.BufferedReader reader)
throws java.io.IOException
java.io.IOExceptionpublic void setUsed(boolean used)
setUsed in interface Py4JClientConnectionpublic void shutdown()
shutdown in interface Py4JClientConnectionpublic void start()
throws java.io.IOException
start in interface Py4JClientConnectionjava.io.IOExceptionpublic boolean wasUsed()
wasUsed in interface Py4JClientConnection