public class CallbackConnection extends Object
Default implementation of the CommunicationChannel interface using TCP sockets.
Constructor and Description |
---|
CallbackConnection(int port,
InetAddress address) |
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() |
public CallbackConnection(int port, InetAddress address)
protected String readBlockingResponse(BufferedReader reader) throws IOException
IOException
protected String readNonBlockingResponse(Socket socket, BufferedReader reader) throws IOException
IOException
public void setUsed(boolean used)
public void shutdown()
public void start() throws IOException
IOException
public boolean wasUsed()