Cosmetics.

This commit is contained in:
Simone Bordet 2012-06-03 18:28:53 +02:00
parent 2cb703b0b5
commit a2a9fd59a2
2 changed files with 5 additions and 5 deletions

View File

@ -47,14 +47,14 @@ public class HTTPSPDYServerConnector extends SPDYServerConnector
// We pass a null ServerSessionFrameListener because for
// HTTP over SPDY we need one that references the endPoint
super(null, sslContextFactory);
// Override the default connection factory for non-SSL connections to speak plain HTTP
setDefaultAsyncConnectionFactory(new ServerHTTPAsyncConnectionFactory(this));
// Override the "spdy/3" protocol by handling HTTP over SPDY
putAsyncConnectionFactory("spdy/3", new ServerHTTPSPDYAsyncConnectionFactory(SPDY.V3, getByteBufferPool(), getExecutor(), getScheduler(), this, pushStrategy));
// Override the "spdy/2" protocol by handling HTTP over SPDY
putAsyncConnectionFactory("spdy/2", new ServerHTTPSPDYAsyncConnectionFactory(SPDY.V2, getByteBufferPool(), getExecutor(), getScheduler(), this, pushStrategy));
// Add the "http/1.1" protocol for browsers that support NPN but not SPDY
putAsyncConnectionFactory("http/1.1", getDefaultAsyncConnectionFactory());
putAsyncConnectionFactory("http/1.1", new ServerHTTPAsyncConnectionFactory(this));
// Override the default connection factory for non-SSL connections to speak plain HTTP
setDefaultAsyncConnectionFactory(getAsyncConnectionFactory("http/1.1"));
}
@Override

View File

@ -72,9 +72,9 @@ public class SPDYServerConnector extends SelectChannelConnector
this.sslContextFactory = sslContextFactory;
if (sslContextFactory != null)
addBean(sslContextFactory);
defaultConnectionFactory = new ServerSPDYAsyncConnectionFactory(SPDY.V2, bufferPool, executor, scheduler, listener);
putAsyncConnectionFactory("spdy/3", new ServerSPDYAsyncConnectionFactory(SPDY.V3, bufferPool, executor, scheduler, listener));
putAsyncConnectionFactory("spdy/2", defaultConnectionFactory);
putAsyncConnectionFactory("spdy/2", new ServerSPDYAsyncConnectionFactory(SPDY.V2, bufferPool, executor, scheduler, listener));
setDefaultAsyncConnectionFactory(getAsyncConnectionFactory("spdy/2"));
}
public ByteBufferPool getByteBufferPool()