Package org.apache.mina.util

Examples of org.apache.mina.util.Queue.push()


        } else {
            s.increaseScheduledWriteBytes(buffer.remaining());
        }

        synchronized (writeRequestQueue) {
            writeRequestQueue.push(writeRequest);
        }
       
        if (session.getTrafficMask().isWritable()) {
            s.getIoProcessor().flush(s);
        }
View Full Code Here


            Queue queue = (Queue) session.getAttribute(WRITE_REQUEST_QUEUE);
            if (queue == null) {
                queue = new Queue();
                session.setAttribute(WRITE_REQUEST_QUEUE, queue);
            }
            queue.push(writeRequest);
            return;
        }

        Object message = writeRequest.getMessage();
View Full Code Here

        // SocketIoProcessor.doFlush() will reset it after write is finished
        // because the buffer will be passed with messageSent event.
        ( ( ByteBuffer ) writeRequest.getMessage() ).mark();
        synchronized( writeRequestQueue )
        {
            writeRequestQueue.push( writeRequest );
            if( writeRequestQueue.size() == 1 && session.getTrafficMask().isWritable() )
            {
                // Notify SocketIoProcessor only when writeRequestQueue was empty.
                s.getIoProcessor().flush( s );
            }
View Full Code Here

        // SocketIoProcessor.doFlush() will reset it after write is finished
        // because the buffer will be passed with messageSent event.
        ( ( ByteBuffer ) writeRequest.getMessage() ).mark();
        synchronized( writeRequestQueue )
        {
            writeRequestQueue.push( writeRequest );
            if( writeRequestQueue.size() == 1 && session.getTrafficMask().isWritable() )
            {
                // Notify DatagramService only when writeRequestQueue was empty.
                s.getManagerDelegate().flushSession( s );
            }
View Full Code Here

            if( queue == null )
            {
                queue = new Queue();
                session.setAttribute( WRITE_REQUEST_QUEUE, queue );
            }
            queue.push( writeRequest );
            return;
        }
       
        Object message = writeRequest.getMessage();
       
View Full Code Here

        // SocketIoProcessor.doFlush() will reset it after write is finished
        // because the buffer will be passed with messageSent event.
        ( ( ByteBuffer ) writeRequest.getMessage() ).mark();
        synchronized( writeRequestQueue )
        {
            writeRequestQueue.push( writeRequest );
            if( writeRequestQueue.size() == 1 && session.getTrafficMask().isWritable() )
            {
                // Notify SocketIoProcessor only when writeRequestQueue was empty.
                s.getIoProcessor().flush( s );
            }
View Full Code Here

        // SocketIoProcessor.doFlush() will reset it after write is finished
        // because the buffer will be passed with messageSent event.
        ( ( ByteBuffer ) writeRequest.getMessage() ).mark();
        synchronized( writeRequestQueue )
        {
            writeRequestQueue.push( writeRequest );
            if( writeRequestQueue.size() == 1 && session.getTrafficMask().isWritable() )
            {
                // Notify DatagramService only when writeRequestQueue was empty.
                s.getManagerDelegate().flushSession( s );
            }
View Full Code Here

            final SessionBuffer buf = getSessionBuffer(session);
            final Queue eventQueue = buf.eventQueue;

            synchronized (buf)
            {
                eventQueue.push(event);
            }

            if (!allSessionBuffers.contains(buf))
            {
                allSessionBuffers.add(buf);
View Full Code Here

        // SocketIoProcessor.doFlush() will reset it after write is finished
        // because the buffer will be passed with messageSent event.
        ( ( ByteBuffer ) writeRequest.getMessage() ).mark();
        synchronized( writeRequestQueue )
        {
            writeRequestQueue.push( writeRequest );
            if( writeRequestQueue.size() == 1 && session.getTrafficMask().isWritable() )
            {
                // Notify DatagramService only when writeRequestQueue was empty.
                s.getManagerDelegate().flushSession( s );
            }
View Full Code Here

            final SessionBuffer buf = getSessionBuffer( session );
            final Queue eventQueue = buf.eventQueue;

            synchronized( buf )
            {
                eventQueue.push( event );
            }

            if( !allSessionBuffers.contains( buf ) )
            {
                allSessionBuffers.add( buf );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.