Package org.eclipse.jetty.spdy.server.http

Examples of org.eclipse.jetty.spdy.server.http.HTTPSPDYServerConnectionFactory


       
       
        // Spdy Connector
        NegotiatingServerConnectionFactory.checkProtocolNegotiationAvailable();
        PushStrategy push = new ReferrerPushStrategy();
        HTTPSPDYServerConnectionFactory spdy2 = new HTTPSPDYServerConnectionFactory(2,config,push);
        spdy2.setInputBufferSize(8192);
        spdy2.setInitialWindowSize(32768);
        HTTPSPDYServerConnectionFactory spdy3 = new HTTPSPDYServerConnectionFactory(3,config,push);
        spdy2.setInputBufferSize(8192);
        NPNServerConnectionFactory npn = new NPNServerConnectionFactory(spdy3.getProtocol(),spdy2.getProtocol(),http.getProtocol());
        npn.setDefaultProtocol(http.getProtocol());
        npn.setInputBufferSize(1024);
        SslConnectionFactory ssl = new SslConnectionFactory(sslContextFactory,npn.getProtocol());
        ServerConnector spdyConnector = new ServerConnector(server,ssl,npn,spdy3,spdy2,http);
        spdyConnector.setPort(8443);
View Full Code Here


        // A ReferrerPushStrategy is being initialized.
        // See:
        // http://www.eclipse.org/jetty/documentation/current/spdy-configuring-push.html
        // for more details.
        PushStrategy push = new ReferrerPushStrategy();
        HTTPSPDYServerConnectionFactory spdy2 =
                new HTTPSPDYServerConnectionFactory(2, config, push);
        spdy2.setInputBufferSize(8192);
        spdy2.setInitialWindowSize(32768);

        // We need a connection factory per protocol that our server is supposed
        // to support on the NPN port. We then
        // create a ServerConnector and pass in the supported factories. NPN
        // will then be used to negotiate the
        // protocol with the client.
        HTTPSPDYServerConnectionFactory spdy3 =
                new HTTPSPDYServerConnectionFactory(3, config, push);
        spdy3.setInputBufferSize(8192);

        NPNServerConnectionFactory npn = new NPNServerConnectionFactory(
                spdy3.getProtocol(), spdy2.getProtocol(), http.getProtocol());
        npn.setDefaultProtocol(http.getProtocol());
        npn.setInputBufferSize(1024);

        SslConnectionFactory ssl = new SslConnectionFactory(sslContextFactory,
                npn.getProtocol());
View Full Code Here

        // HTTPS Configuration
        HttpConfiguration https_config = new HttpConfiguration(http_config);
        https_config.addCustomizer(new SecureRequestCustomizer());
       
        // SPDY versions
        HTTPSPDYServerConnectionFactory spdy2 =
                new HTTPSPDYServerConnectionFactory(2, https_config);

        HTTPSPDYServerConnectionFactory spdy3 =
                new HTTPSPDYServerConnectionFactory(3, https_config,
                        new ReferrerPushStrategy());

        // NPN Factory
        NegotiatingServerConnectionFactory.checkProtocolNegotiationAvailable();
        NPNServerConnectionFactory npn = new NPNServerConnectionFactory(
                spdy3.getProtocol(),
                spdy2.getProtocol(),
                http.getDefaultProtocol());
        npn.setDefaultProtocol(http.getDefaultProtocol());

        // SSL Factory
View Full Code Here

    private HttpClient httpClient;

    public void prepare(Handler handler) throws Exception
    {
        server = new Server();
        connector = new ServerConnector(server, new CAFEBABEServerConnectionFactory(new HTTPSPDYServerConnectionFactory(SPDY.V3, new HttpConfiguration(), new PushStrategy.None())));
        server.addConnector(connector);
        server.setHandler(handler);
        server.start();

        QueuedThreadPool executor = new QueuedThreadPool();
View Full Code Here

    public void start(Handler handler) throws Exception
    {
        short version = SPDY.V3;

        HTTPSPDYServerConnectionFactory httpSPDY = new HTTPSPDYServerConnectionFactory(version, new HttpConfiguration());
        if (sslContextFactory != null)
        {
            sslContextFactory.setEndpointIdentificationAlgorithm("");
            sslContextFactory.setKeyStorePath("src/test/resources/keystore.jks");
            sslContextFactory.setKeyStorePassword("storepwd");
View Full Code Here

        final SslContextFactory sslContextFactory = buildSslContextFactory();
        server.addBean(sslContextFactory);

        final PushStrategy pushStrategy = this.pushStrategy.build();
        final HTTPSPDYServerConnectionFactory spdy3Factory =
                new HTTPSPDYServerConnectionFactory(SPDY.V3, httpConfig, pushStrategy);

        final NPNServerConnectionFactory npnFactory =
                new NPNServerConnectionFactory("spdy/3", "spdy/2", "http/1.1");
        npnFactory.setDefaultProtocol("http/1.1");

        final HTTPSPDYServerConnectionFactory spdy2Factory =
                new HTTPSPDYServerConnectionFactory(SPDY.V2, httpConfig, pushStrategy);

        final SslConnectionFactory sslConnectionFactory =
                new SslConnectionFactory(sslContextFactory, "npn");

        final Scheduler scheduler = new ScheduledExecutorScheduler();
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.spdy.server.http.HTTPSPDYServerConnectionFactory

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.