public SPDYServerConnector(Server server, ServerSessionFrameListener listener) { super(server, (SslContextFactory)null, new SPDYServerConnectionFactory(SPDY.V2, listener)); }
/** * @deprecated use {@link #checkProtocolNegotiationAvailable()} instead. */ @Deprecated public static void checkNPNAvailable() { checkProtocolNegotiationAvailable(); }
public static void checkProtocolNegotiationAvailable() { if (!isAvailableInBootClassPath("org.eclipse.jetty.alpn.ALPN") && !isAvailableInBootClassPath("org.eclipse.jetty.npn.NextProtoNego")) throw new IllegalStateException("No ALPN nor NPN classes available"); }
@Override public Connection newConnection(Connector connector, EndPoint endPoint) { CompressionFactory compressionFactory = new StandardCompressionFactory(); Parser parser = new Parser(compressionFactory.newDecompressor()); Generator generator = new Generator(connector.getByteBufferPool(), compressionFactory.newCompressor()); ServerSessionFrameListener listener = provideServerSessionFrameListener(connector, endPoint); SPDYConnection connection = new ServerSPDYConnection(connector, endPoint, parser, listener, isDispatchIO(), getInputBufferSize()); FlowControlStrategy flowControlStrategy = newFlowControlStrategy(version); StandardSession session = new StandardSession(getVersion(), connector.getByteBufferPool(), connector.getScheduler(), connection, endPoint, connection, 2, listener, generator, flowControlStrategy); session.setWindowSize(getInitialWindowSize()); parser.addListener(session); connection.setSession(session); sessionOpened(session); return configure(connection, connector, endPoint); }
@Override protected void doStop() throws Exception { closeSessions(); super.doStop(); }
@Override protected void dumpThis(Appendable out) throws IOException { super.dumpThis(out); dump(out, "", sessions); }
public SPDYServerConnector(Server server, SslContextFactory sslContextFactory, ServerSessionFrameListener listener, NegotiatingServerConnectionFactory negotiator) { super(server, Objects.requireNonNull(sslContextFactory), negotiator, new SPDYServerConnectionFactory(SPDY.V3, listener), new SPDYServerConnectionFactory(SPDY.V2, listener), new HttpConnectionFactory()); negotiator.setDefaultProtocol("http/1.1"); } }
public HTTPSPDYProxyServerConnector(Server server, SslContextFactory sslContextFactory, HttpConfiguration config, ProxyEngineSelector proxyEngineSelector, NegotiatingServerConnectionFactory negotiatingFactory) { super(server, Objects.requireNonNull(sslContextFactory), negotiatingFactory, new SPDYServerConnectionFactory(SPDY.V3, proxyEngineSelector), new SPDYServerConnectionFactory(SPDY.V2, proxyEngineSelector), new ProxyHTTPConnectionFactory(config, SPDY.V2, proxyEngineSelector)); negotiatingFactory.setDefaultProtocol("http/1.1"); } }