Package org.apache.catalina.cluster.io

Examples of org.apache.catalina.cluster.io.ObjectReader


    {
        boolean packetReceived=false;
        SocketChannel channel = (SocketChannel) key.channel();
        int count;
        buffer.clear();      // make buffer empty
        ObjectReader reader = (ObjectReader)key.attachment();
        // loop while data available, channel is non-blocking
        while ((count = channel.read (buffer)) > 0) {
            buffer.flip();    // make buffer readable
            int pkgcnt = reader.append(buffer.array(),0,count);
            buffer.clear();    // make buffer empty
        }
        //check to see if any data is available
        int pkgcnt = reader.execute();
        while ( pkgcnt > 0 ) {
            if (synchronous) {
                sendAck(key,channel);
            } //end if
            pkgcnt--;
View Full Code Here


                            (ServerSocketChannel) key.channel();
                        SocketChannel channel = server.accept();
                        registerChannel(selector,
                                        channel,
                                        SelectionKey.OP_READ,
                                        new ObjectReader(channel, selector,
                            callback));
                    }
                    // is there data to read on this channel?
                    if (key.isReadable()) {
                        readDataFromSocket(key);
View Full Code Here

    {
        boolean packetReceived=false;
        SocketChannel channel = (SocketChannel) key.channel();
        int count;
        buffer.clear();      // make buffer empty
        ObjectReader reader = (ObjectReader)key.attachment();
        // loop while data available, channel is non-blocking
        while ((count = channel.read (buffer)) > 0) {
            buffer.flip();    // make buffer readable
            int pkgcnt = reader.append(buffer.array(),0,count);
            buffer.clear();    // make buffer empty
        }
        //check to see if any data is available
        int pkgcnt = reader.execute();
        while ( pkgcnt > 0 ) {
            if (waitForAck) {
                sendAck(key,channel);
            } //end if
            pkgcnt--;
View Full Code Here

                            (ServerSocketChannel) key.channel();
                        SocketChannel channel = server.accept();
                        registerChannel(selector,
                                        channel,
                                        SelectionKey.OP_READ,
                                        new ObjectReader(channel, selector,
                            callback));
                    }
                    // is there data to read on this channel?
                    if (key.isReadable()) {
                        readDataFromSocket(key);
View Full Code Here

    {
        boolean packetReceived=false;
        SocketChannel channel = (SocketChannel) key.channel();
        int count;
        buffer.clear();      // make buffer empty
        ObjectReader reader = (ObjectReader)key.attachment();
        // loop while data available, channel is non-blocking
        while ((count = channel.read (buffer)) > 0) {
            buffer.flip();    // make buffer readable
            int pkgcnt = reader.append(buffer.array(),0,count);
            buffer.clear();    // make buffer empty
        }
        //check to see if any data is available
        int pkgcnt = reader.execute();
        while ( pkgcnt > 0 ) {
            if (synchronous) {
                sendAck(key,channel);
            } //end if
            pkgcnt--;
View Full Code Here

                            (ServerSocketChannel) key.channel();
                        SocketChannel channel = server.accept();
                        registerChannel(selector,
                                        channel,
                                        SelectionKey.OP_READ,
                                        new ObjectReader(channel, selector,
                            callback));
                    }
                    // is there data to read on this channel?
                    if (key.isReadable()) {
                        readDataFromSocket(key);
View Full Code Here

TOP

Related Classes of org.apache.catalina.cluster.io.ObjectReader

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.