use of org.apache.mina.core.future.ConnectFuture in project streamsx.topology by IBMStreams.
the class TCPTestClient method connect.
public synchronized void connect() throws InterruptedException {
for (; ; ) {
try {
ConnectFuture future = connector.connect(addr);
future.awaitUninterruptibly();
session = future.getSession();
return;
} catch (RuntimeIoException e) {
System.err.println("Failed to connect.");
e.printStackTrace();
Thread.sleep(5000);
}
}
}
Aggregations