Examples of GoAwayInfo


Examples of org.eclipse.jetty.spdy.api.GoAwayInfo

    @Test
    public void testSessionClosedIsRemovedFromClientFactory() throws Exception
    {
        Session session = startClient(startServer(null), null);

        session.goAway(new GoAwayInfo(5, TimeUnit.SECONDS));

        for (int i=0;i<10;i++)
        {
            // Sleep a while to allow the factory to remove the session
            // since it is done asynchronously by the selector thread
View Full Code Here

Examples of org.eclipse.jetty.spdy.api.GoAwayInfo

    @Test
    public void testSessionClosedIsRemovedFromServerConnector() throws Exception
    {
        Session session = startClient(startServer(null), null);

        session.goAway(new GoAwayInfo(5, TimeUnit.SECONDS));

        // Sleep a while to allow the connector to remove the session
        // since it is done asynchronously by the selector thread
        TimeUnit.SECONDS.sleep(1);
View Full Code Here

Examples of org.eclipse.jetty.spdy.api.GoAwayInfo

        };
        Session session = startClient(startServer(serverSessionFrameListener), null);

        session.syn(new SynInfo(new Fields(), true), null);

        session.goAway(new GoAwayInfo());

        Assert.assertTrue(latch.await(5, TimeUnit.SECONDS));
    }
View Full Code Here

Examples of org.eclipse.jetty.spdy.api.GoAwayInfo

        {
            @Override
            public StreamFrameListener onSyn(Stream stream, SynInfo synInfo)
            {
                stream.reply(new ReplyInfo(true), new Callback.Adapter());
                stream.getSession().goAway(new GoAwayInfo(), new FutureCallback());
                return null;
            }
        };
        final AtomicReference<GoAwayResultInfo> ref = new AtomicReference<>();
        final CountDownLatch latch = new CountDownLatch(1);
View Full Code Here

Examples of org.eclipse.jetty.spdy.api.GoAwayInfo

            {
                int synCount = syns.incrementAndGet();
                if (synCount == 1)
                {
                    stream.reply(new ReplyInfo(true), new Callback.Adapter());
                    stream.getSession().goAway(new GoAwayInfo(), new FutureCallback());
                }
                else
                {
                    latch.countDown();
                }
View Full Code Here

Examples of org.eclipse.jetty.spdy.api.GoAwayInfo

                {
                    return null;
                }
                else
                {
                    stream.getSession().goAway(new GoAwayInfo(), new FutureCallback());
                    closeLatch.countDown();
                    return new StreamFrameListener.Adapter()
                    {
                        @Override
                        public void onData(Stream stream, DataInfo dataInfo)
View Full Code Here

Examples of org.eclipse.jetty.spdy.api.GoAwayInfo

        }

        private void closeConnections()
        {
            for (Session session : sessions)
                session.goAway(new GoAwayInfo(), Callback.Adapter.INSTANCE);
            sessions.clear();
        }
View Full Code Here

Examples of org.eclipse.jetty.spdy.api.GoAwayInfo

    public void close()
    {
        // First close then abort, to be sure that the connection cannot be reused
        // from an onFailure() handler or by blocking code waiting for completion.
        getHttpDestination().close(this);
        session.goAway(new GoAwayInfo(), Callback.Adapter.INSTANCE);
        abort(new AsynchronousCloseException());
    }
View Full Code Here

Examples of org.eclipse.jetty.spdy.api.GoAwayInfo

    }

    protected void goAway(ISession session)
    {
        if (session != null)
            session.goAway(new GoAwayInfo(), Callback.Adapter.INSTANCE);
    }
View Full Code Here

Examples of org.eclipse.jetty.spdy.api.GoAwayInfo

        channel.write(writeBuffer);
        Assert.assertThat(writeBuffer.hasRemaining(), is(false));

        Assert.assertFalse(dataLatch.await(1, TimeUnit.SECONDS));

        session.goAway(new GoAwayInfo(5, TimeUnit.SECONDS));

        server.close();
    }
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.