Package org.apache.mina.transport

Examples of org.apache.mina.transport.ConnectFuture


        // the socket is blocking, and either true or false if it's non blocking
        boolean connected;
        try {
            connected = clientSocket.connect(remoteAddress);
        } catch (IOException e) {
            ConnectFuture future = new ConnectFuture();
            future.cannotConnect(e);
            return future;
        }

        ConnectFuture connectFuture = new ConnectFuture();
        session.setConnectFuture(connectFuture);

        if (!connected) {
            // async connection, let's the connection complete in background, the selector loop will detect when the
            // connection is successful
View Full Code Here


    @Override
    public IoFuture<IoSession> connect(SocketAddress remoteAddress) {
        BioUdpSession session = new BioUdpSession(remoteAddress, BioUdpServer.this, idleChecker);
        sessions.put(remoteAddress, session);
        ConnectFuture cf = new ConnectFuture();
        cf.complete(session);
        return cf;
    }
View Full Code Here

            session.getConfig().setTrafficClass(trafficClass);
        }

        loop.register(false, false, true, false, session, ch, null);

        ConnectFuture cf = new ConnectFuture();
        cf.complete(session);

        return cf;
    }
View Full Code Here

    @Override
    public IoFuture<IoSession> connect(SocketAddress remoteAddress) {
        BioUdpSession session = new BioUdpSession(remoteAddress, BioUdpServer.this, idleChecker);
        sessions.put(remoteAddress, session);
        ConnectFuture cf = new ConnectFuture();
        cf.complete(session);
        return cf;
    }
View Full Code Here

TOP

Related Classes of org.apache.mina.transport.ConnectFuture

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.