// 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());