Package org.eclipse.jetty.spdy.api

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


        Session session = startClient(version, serverAddress, null);

        Settings settings = new Settings();
        settings.put(new Settings.Setting(Settings.ID.MAX_CONCURRENT_STREAMS, 0));
        SettingsInfo settingsInfo = new SettingsInfo(settings);
        session.settings(settingsInfo);

        ((StdErrLog)Log.getLogger("org.eclipse.jetty.spdy.server.http" +
                        ".HttpTransportOverSPDY$PushResourceCoordinator$1")).setHideStacks(true);
        session.syn(new SynInfo(mainRequestHeaders, true), new StreamFrameListener.Adapter()
View Full Code Here


            int maxConcurrentStreamsValue = maxConcurrentStreamsSetting.value();
            maxConcurrentLocalStreams = maxConcurrentStreamsValue;
            if (LOG.isDebugEnabled())
                LOG.debug("Updated session maxConcurrentLocalStreams to {}", maxConcurrentStreamsValue);
        }
        SettingsInfo settingsInfo = new SettingsInfo(frame.getSettings(), frame.isClearPersisted());
        notifyOnSettings(listener, settingsInfo);
    }
View Full Code Here

            {
                Settings settings = new Settings();
                settings.put(new Settings.Setting(Settings.ID.MAX_CONCURRENT_STREAMS, 1));
                try
                {
                    session.settings(new SettingsInfo(settings));
                }
                catch (ExecutionException | InterruptedException | TimeoutException e)
                {
                    e.printStackTrace();
                }
View Full Code Here

                        if (dataFrameCount == 1)
                        {
                            dataInfoRef.set(dataInfo);
                            Settings settings = new Settings();
                            settings.put(new Settings.Setting(Settings.ID.INITIAL_WINDOW_SIZE, size));
                            stream.getSession().settings(new SettingsInfo(settings), new FutureCallback());
                        }
                        else if (dataFrameCount > 1)
                        {
                            dataInfo.consume(dataInfo.length());
                            dataLatch.countDown();
View Full Code Here

            }
        }), null);

        Settings settings = new Settings();
        settings.put(new Settings.Setting(Settings.ID.INITIAL_WINDOW_SIZE, windowSize));
        session.settings(new SettingsInfo(settings));

        Assert.assertTrue(settingsLatch.await(5, TimeUnit.SECONDS));

        final Exchanger<DataInfo> exchanger = new Exchanger<>();
        session.syn(new SynInfo(new Fields(), true), new StreamFrameListener.Adapter()
View Full Code Here

            @Override
            public void onConnect(Session session)
            {
                Settings settings = new Settings();
                settings.put(new Settings.Setting(Settings.ID.INITIAL_WINDOW_SIZE, windowSize));
                session.settings(new SettingsInfo(settings), new FutureCallback());
            }

            @Override
            public StreamFrameListener onSyn(Stream stream, SynInfo synInfo)
            {
View Full Code Here

                return null;
            }
        }), null);
        Settings settings = new Settings();
        settings.put(new Settings.Setting(Settings.ID.INITIAL_WINDOW_SIZE, windowSize));
        session.settings(new SettingsInfo(settings));

        Assert.assertTrue(settingsLatch.await(5, TimeUnit.SECONDS));

        final CountDownLatch latch = new CountDownLatch(3);
        final AtomicReference<DataInfo> dataInfoRef1 = new AtomicReference<>();
View Full Code Here

    {
        Settings settings = new Settings();
        settings.put(new Settings.Setting(Settings.ID.UPLOAD_BANDWIDTH, 1024 * 1024));
        settings.put(new Settings.Setting(Settings.ID.DOWNLOAD_BANDWIDTH, 1024 * 1024));
        settings.put(new Settings.Setting(Settings.ID.CURRENT_CONGESTION_WINDOW, Settings.Flag.PERSISTED, 1024));
        final SettingsInfo clientSettingsInfo = new SettingsInfo(settings);
        final CountDownLatch latch = new CountDownLatch(1);
        ServerSessionFrameListener serverSessionFrameListener = new ServerSessionFrameListener.Adapter()
        {
            @Override
            public void onSettings(Session session, SettingsInfo serverSettingsInfo)
            {
                Assert.assertEquals(clientSettingsInfo.getFlags(), serverSettingsInfo.getFlags());
                Assert.assertEquals(clientSettingsInfo.getSettings(), serverSettingsInfo.getSettings());
                latch.countDown();
            }
        };
        Session session = startClient(startServer(serverSessionFrameListener), null);

View Full Code Here

    {
        Settings settings = new Settings();
        settings.put(new Settings.Setting(Settings.ID.UPLOAD_BANDWIDTH, 1024 * 1024));
        settings.put(new Settings.Setting(Settings.ID.DOWNLOAD_BANDWIDTH, 1024 * 1024));
        settings.put(new Settings.Setting(Settings.ID.CURRENT_CONGESTION_WINDOW, Settings.Flag.PERSIST, 1024));
        final SettingsInfo serverSettingsInfo = new SettingsInfo(settings);
        ServerSessionFrameListener serverSessionFrameListener = new ServerSessionFrameListener.Adapter()
        {
            @Override
            public void onConnect(Session session)
            {
                session.settings(serverSettingsInfo, new FutureCallback());
            }
        };

        final CountDownLatch latch = new CountDownLatch(1);
        SessionFrameListener clientSessionFrameListener = new SessionFrameListener.Adapter()
        {
            @Override
            public void onSettings(Session session, SettingsInfo clientSettingsInfo)
            {
                Assert.assertEquals(serverSettingsInfo.getFlags(), clientSettingsInfo.getFlags());
                Assert.assertEquals(serverSettingsInfo.getSettings(), clientSettingsInfo.getSettings());
                latch.countDown();
            }
        };

        startClient(startServer(serverSessionFrameListener), clientSessionFrameListener);
View Full Code Here

            }
        });

        Settings settings = new Settings();
        settings.put(new Settings.Setting(Settings.ID.INITIAL_WINDOW_SIZE, Settings.Flag.PERSIST, 0xC0_00));
        SettingsInfo settingsInfo = new SettingsInfo(settings);

        Session sessionV2 = startClient(address, null);
        sessionV2.settings(settingsInfo);

        Session sessionV3 = clientFactory.newSPDYClient(SPDY.V3).connect(address, null);
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.spdy.api.SettingsInfo

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.