Package org.activeio

Examples of org.activeio.SynchChannelFactory


   
    private URI serverURI;

    protected ChannelServer createChannelServer(final RequestListener requestListener) throws IOException, URISyntaxException {

        SynchChannelFactory factory = new SocketSynchChannelFactory();
       
        AsynchChannelServer server = new SynchToAsynchChannelServerAdapter(factory.bindSynchChannel(new URI("tcp://localhost:0")));
       
        server.setAcceptListener(new AcceptListener() {
            public void onAccept(Channel channel) {
             
                RequestChannel requestChannel = null;
View Full Code Here


    /**
     * @return
     * @throws IOException
     */
    protected RequestChannel createClientRequestChannel() throws IOException {
        SynchChannelFactory factory = new SocketSynchChannelFactory();
        PacketAggregatingSynchChannel channel = new PacketAggregatingSynchChannel(factory.openSynchChannel(serverURI));
    ((SocketMetadata)channel.narrow(SocketMetadata.class)).setTcpNoDelay(true);
        return new AsynchChannelToClientRequestChannel(channel);
    }
View Full Code Here

TOP

Related Classes of org.activeio.SynchChannelFactory

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.