Package org.apache.mina.util

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


            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


        Queue writeMarkerQueue = s.getWriteMarkerQueue();
       
        synchronized( writeBufferQueue )
        {
            writeBufferQueue.push( buf );
            writeMarkerQueue.push( marker );
            if( writeBufferQueue.size() == 1 )
            {
                // Notify DatagramSessionManager only when writeBufferQueue was empty.
                ( ( DatagramSessionManager ) getManager() ).flushSession( s );
            }
View Full Code Here

    {
        IoProtocolSession s = ( IoProtocolSession ) session;
        Queue writeQueue = s.writeQueue;
        synchronized( writeQueue )
        {
            writeQueue.push( message );
        }

        s.shAdapter.doWrite( s.session );
    }
}
View Full Code Here

        Queue writeMarkerQueue = s.getWriteMarkerQueue();
       
        synchronized( writeBufferQueue )
        {
            writeBufferQueue.push( buf );
            writeMarkerQueue.push( marker );
            if( writeBufferQueue.size() == 1 )
            {
                // Notify SocketIoProcessor only when writeBufferQueue was empty.
                SocketIoProcessor.getInstance().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

        Queue writeRequestQueue = s.getWriteRequestQueue();
       
        ( ( 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

        DatagramSessionImpl s = ( DatagramSessionImpl ) session;
        Queue writeRequestQueue = s.getWriteRequestQueue();
       
        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

        DatagramSessionImpl s = ( DatagramSessionImpl ) session;
        Queue writeRequestQueue = s.getWriteRequestQueue();
       
        synchronized( writeRequestQueue )
        {
            writeRequestQueue.push( writeRequest );
            if( writeRequestQueue.size() == 1 && session.getTrafficMask().isWritable() )
            {
                // Notify DatagramSessionManager 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.