Package com.ibm.io.async

Examples of com.ibm.io.async.AsyncSocketChannel


     * Uses the {@param location}'s host and port to create a tcp connection to a remote host.
     *
     * @see org.activeio.AsynchChannelFactory#openAsynchChannel(java.net.URI)
     */
    public AsynchChannel openAsynchChannel(URI location) throws IOException {
        AsyncSocketChannel channel = AsyncSocketChannel.open();
        channel.connect(new InetSocketAddress(location.getHost(), location.getPort()));
        return createAsynchChannel(channel);
    }
View Full Code Here


        // notify other threads that they can now write
        writeSync.release();
    }

    protected AsyncSocketChannel createSocket(URI remoteLocation) throws UnknownHostException, IOException, InterruptedException {
        AsyncSocketChannel answer = AsyncSocketChannel.open();
        IConnectionFuture future = answer.connect(new InetSocketAddress(remoteLocation.getHost(), remoteLocation.getPort()));
        future.waitForCompletion();
        return answer;
    }
View Full Code Here

        // notify other threads that they can now write
        writeSync.release();
    }

    protected AsyncSocketChannel createSocket(URI remoteLocation) throws UnknownHostException, IOException, InterruptedException {
        AsyncSocketChannel answer = AsyncSocketChannel.open();
        IConnectionFuture future = answer.connect(new InetSocketAddress(remoteLocation.getHost(), remoteLocation.getPort()));
        future.waitForCompletion();
        return answer;
    }
View Full Code Here

TOP

Related Classes of com.ibm.io.async.AsyncSocketChannel

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.