Thread engineThread = new Thread(
new Runnable() {
public void run() {
- Receiver<String> acceptorReceiver = acceptor.receiver();
+ Transmitter<String> acceptorTransmitter = acceptor.transmitter();
try {
- while (acceptorReceiver.isActive()) {
- if (acceptorReceiver.hasCommand()) {
- String command = acceptorReceiver.receiveCommand();
+ while (acceptorTransmitter.isActive()) {
+ if (acceptorTransmitter.hasCommand()) {
+ String command = acceptorTransmitter.transmitCommand();
if (command.isEmpty()) continue;
CommandParams commandParams = new CommandParams(command);
commandExecutor.exec(
commandParams.getParams()
);
if (UCIConstants.QUIT.equals(commandParams.getName()))
- acceptorReceiver.stop();
+ acceptorTransmitter.stop();
}
}
} finally {
- acceptorReceiver.close();
+ acceptorTransmitter.close();
isRunning = false;
}
}