Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Dependency tree built

Hi,

On Thu, Sep 17, 2015 at 4:45 AM, Muhui Jiang <jiangmuhui@xxxxxxxxx> wrote:
> Hi.
>
> DId you mean that I need to listen to  the headersframe of A sent by server
> and let the B & C depend on the streamId of the headersframe we heard.

No I mean you need to wait for the client-side HEADERS frame to be sent:

session.newStream(new HeadersFrame(metaDataA, null, true), new Promise<Stream>()
{
    @Override
    public void succeeded(Stream stream)
    {
        // Now we have the streamId.
        int streamIdA = stream.getId();
        session.newStream(new HeadersFrame(metaDataB, new
PriorityFrame(streamIdA, weightB, false), true), new
Promise.Adapter<>(), new Stream.Listener.Adapter());
        session.newStream(new HeadersFrame(metaDataC, new
PriorityFrame(streamIdA, weightC, false), true), new
Promise.Adapter<>(), new Stream.Listener.Adapter());
   }
}, new Stream.Listener.Adapter());

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.


Back to the top