Package org.eclipse.jetty.spdy.StandardSession

Examples of org.eclipse.jetty.spdy.StandardSession.FrameBytes


                // Scan queue for data to write from first non stalled stream.
                int index = 0; // The index of the first non-stalled frame.
                int size = queue.size();
                while (index < size)
                {
                    FrameBytes frameBytes = queue.getUnsafe(index);
                    IStream stream = frameBytes.getStream();

                    if (stream != null)
                    {
                        // Is it a frame belonging to an already stalled stream ?
                        if (stalled.size() > 0 && stalled.contains(stream))
                        {
                            ++index;
                            continue;
                        }

                        // Has the stream consumed all its flow control window ?
                        if (stream.getWindowSize() <= 0)
                        {
                            stalled.add(stream);
                            ++index;
                            continue;
                        }
                    }

                    // We will be possibly writing this frame, so take the frame off the queue.
                    queue.remove(index);
                    --size;

                    // Has the stream been reset for this data frame ?
                    if (stream != null && stream.isReset() && frameBytes instanceof StandardSession.DataFrameBytes)
                    {
                        // TODO: notify from within sync block !
                        frameBytes.failed(new StreamException(frameBytes.getStream().getId(),
                                StreamStatus.INVALID_STREAM, "Stream: " + frameBytes.getStream() + " is reset!"));
                        continue;
                    }

                    active.add(frameBytes);
                }
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.spdy.StandardSession.FrameBytes

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.