Skip to content
Snippets Groups Projects
Commit b772f9e3 authored by dgelessus's avatar dgelessus
Browse files

Remove some unused stuff from ServerConnection

parent 9c310df7
No related branches found
No related tags found
No related merge requests found
......@@ -27,22 +27,12 @@ public class ServerConnection {
private CliStarter cli = null;
private String lastCommand;
private volatile boolean shutdown = true;
// private static final ScheduledExecutorService exec = new
// ScheduledThreadPoolExecutor(
// 1);
private void startcli(final File file) throws CliException {
cli = new CliStarter(file);
}
public String getLastCommand() {
return lastCommand;
}
private void establishConnection(final int port) throws CliException {
try {
socket = new Socket(InetAddress.getByName(null), port);
......@@ -75,7 +65,6 @@ public class ServerConnection {
}
private void sendQuery(final String commandString) throws ProBException {
lastCommand = commandString;
Logger.assertProB("commandString.trim().endsWith(\".\")", commandString
.trim().endsWith("."));
......@@ -99,24 +88,6 @@ public class ServerConnection {
return input;
}
// private String timedRun(final Callable<String> r, final long timeOut,
// final TimeUnit unit) throws InterruptedException, ProBException {
// String s = null;
// Future<String> task = exec.submit(r);
// try {
// s = task.get(timeOut, unit);
// } catch (TimeoutException e) {
// final String message = "Timeout while waiting for ProB's answer";
// ProblemHandler.handleCliException(message, e);
// } catch (ExecutionException e) {
// final String message = e.getCause().getLocalizedMessage();
// ProblemHandler.handleCliException(message, e.getCause());
// } finally {
// task.cancel(true);
// }
// return s;
// }
protected String readAnswer() throws IOException {
final StringBuilder result = new StringBuilder();
final byte[] buffer = new byte[1024];
......@@ -190,10 +161,6 @@ public class ServerConnection {
}
}
public int getCliPortNumber() {
return cli.getPort();
}
public void sendUserInterruptSignal() {
if (cli != null) {
cli.sendUserInterruptReference();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment