@Override
public void connect(WaitingTelnetClientHandler clientHandler) {
Hold c = clients.get(address);
if (c == null) {
TelnetClient telnetClient = new TelnetClient();
if (!Double.isNaN(callWithEmptyTime)) {
telnetClient.withCallWithEmptyTime(callWithEmptyTime);
}
if (readyFactory != null) {
telnetClient.override(readyFactory);
}
WaitingTelnetClient waitingTelnetClient = new WaitingTelnetClient(telnetClient.withAddress(address).withQueue(queue, callWithEmptyExecutor));
if (!Double.isNaN(endOfCommandTime)) {
waitingTelnetClient.withEndOfCommandTime(endOfCommandTime);
}
if (!Double.isNaN(timeout)) {
waitingTelnetClient.withTimeout(timeout);