Search in sources :

Example 1 with RuntimeIoException

use of org.apache.mina.core.RuntimeIoException 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);
        }
    }
}
Also used : ConnectFuture(org.apache.mina.core.future.ConnectFuture) RuntimeIoException(org.apache.mina.core.RuntimeIoException)

Aggregations

RuntimeIoException (org.apache.mina.core.RuntimeIoException)1 ConnectFuture (org.apache.mina.core.future.ConnectFuture)1