diff --git a/example-jetty-embedded/pom.xml b/example-jetty-embedded/pom.xml index 03da5633e3e..adfeb259a71 100644 --- a/example-jetty-embedded/pom.xml +++ b/example-jetty-embedded/pom.xml @@ -41,7 +41,7 @@ org.eclipse.jetty.spdy - spdy-jetty-http + spdy-http-server ${project.version} diff --git a/example-jetty-embedded/src/main/java/org/eclipse/jetty/embedded/ManyConnectors.java b/example-jetty-embedded/src/main/java/org/eclipse/jetty/embedded/ManyConnectors.java index f45c5d18310..bf3a6a55e45 100644 --- a/example-jetty-embedded/src/main/java/org/eclipse/jetty/embedded/ManyConnectors.java +++ b/example-jetty-embedded/src/main/java/org/eclipse/jetty/embedded/ManyConnectors.java @@ -25,13 +25,13 @@ import org.eclipse.jetty.server.ForwardedRequestCustomizer; import org.eclipse.jetty.server.HttpChannelConfig; import org.eclipse.jetty.server.HttpConnectionFactory; import org.eclipse.jetty.server.SecureRequestCustomizer; -import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.server.SslConnectionFactory; -import org.eclipse.jetty.spdy.NPNServerConnectionFactory; -import org.eclipse.jetty.spdy.http.PushStrategy; -import org.eclipse.jetty.spdy.http.ReferrerPushStrategy; -import org.eclipse.jetty.spdy.http.HTTPSPDYServerConnectionFactory; +import org.eclipse.jetty.spdy.server.NPNServerConnectionFactory; +import org.eclipse.jetty.spdy.server.http.HTTPSPDYServerConnectionFactory; +import org.eclipse.jetty.spdy.server.http.PushStrategy; +import org.eclipse.jetty.spdy.server.http.ReferrerPushStrategy; import org.eclipse.jetty.util.ssl.SslContextFactory; import org.eclipse.jetty.util.thread.QueuedThreadPool; import org.eclipse.jetty.util.thread.TimerScheduler; @@ -47,7 +47,7 @@ public class ManyConnectors { String jetty_home = System.getProperty("jetty.home","../jetty-server/src/main/config"); System.setProperty("jetty.home", jetty_home); - + Server server = new Server(); // HTTP connector @@ -60,13 +60,13 @@ public class ManyConnectors sslContextFactory.setKeyStorePath(jetty_home + "/etc/keystore"); sslContextFactory.setKeyStorePassword("OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4"); sslContextFactory.setKeyManagerPassword("OBF:1u2u1wml1z7s1z7a1wnl1u2g"); - + ServerConnector connector1 = new ServerConnector(server,sslContextFactory); connector1.setPort(8443); - - + + // A verbosely fully configured connector with SSL, SPDY and HTTP - + HttpChannelConfig config = new HttpChannelConfig(); config.setSecureScheme("https"); config.setSecurePort(8443); @@ -75,39 +75,39 @@ public class ManyConnectors config.setResponseHeaderSize(8192); config.addCustomizer(new ForwardedRequestCustomizer()); config.addCustomizer(new SecureRequestCustomizer()); - + HttpConnectionFactory http = new HttpConnectionFactory(config); http.setInputBufferSize(16384); - + 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()); - + QueuedThreadPool threadPool = new QueuedThreadPool(); threadPool.setMaxThreads(256); TimerScheduler scheduler = new TimerScheduler(); ByteBufferPool bufferPool= new ArrayByteBufferPool(32,4096,32768); - - ServerConnector connector2 = new ServerConnector(server,threadPool,scheduler,bufferPool,2,2,ssl,npn,spdy3,spdy2,http); + + ServerConnector connector2 = new ServerConnector(server,threadPool,scheduler,bufferPool,2,2,ssl,npn,spdy3,spdy2,http); connector2.setDefaultProtocol("ssl-npn"); connector2.setPort(8444); connector2.setIdleTimeout(30000); connector2.setSoLingerTime(10000); - + // Set the connectors server.setConnectors(new Connector[] { connector0, connector1, connector2 }); - + server.setHandler(new HelloHandler()); server.start(); diff --git a/jetty-distribution/pom.xml b/jetty-distribution/pom.xml index a348cfe27d0..bc16e3a1b7c 100644 --- a/jetty-distribution/pom.xml +++ b/jetty-distribution/pom.xml @@ -309,7 +309,7 @@ org.eclipse.jetty.orbit javax.security.auth.message - + org.eclipse.jetty @@ -342,7 +342,7 @@ websocket-server ${project.version} - + org.eclipse.jetty jetty-jsp @@ -354,14 +354,14 @@ jetty-plus ${project.version} - + org.eclipse.jetty jetty-annotations ${project.version} - - + @@ -37,9 +37,9 @@ - + - + @@ -51,7 +51,7 @@ Such requests are converted from SPDY/x(HTTP) to SPDY/2(HTTP) by the configured ProxyEngine and forwarded to 127.0.0.1:9090, where they are served by the upstream server above. --> - + spdy/2 @@ -61,7 +61,7 @@ localhost - + spdy/2 127.0.0.1 9090 @@ -81,7 +81,7 @@ --> - + @@ -94,7 +94,7 @@ - + diff --git a/jetty-spdy/spdy-example-webapp/src/main/config/etc/jetty-spdy.xml b/jetty-spdy/spdy-example-webapp/src/main/config/etc/jetty-spdy.xml new file mode 100644 index 00000000000..b8750b44364 --- /dev/null +++ b/jetty-spdy/spdy-example-webapp/src/main/config/etc/jetty-spdy.xml @@ -0,0 +1,115 @@ + + + + + + + + + + /etc/keystore + + OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4 + OBF:1u2u1wml1z7s1z7a1wnl1u2g + /etc/keystore + + OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4 + + + + + + + + + + + + + + + + + + + + .*\.css + .*\.js + .*\.png + .*\.jpg + .*\.gif + + + + + + + + + + + + + + + + + + npn + + + + + + + + + + + spdy/3 + spdy/2 + http/1.1 + + + http/1.1 + + + + + + 3 + + + + + + + + + + 2 + + + + + + + + + + + + + + + + + + + 8443 + 30000 + + + + + diff --git a/jetty-spdy/spdy-jetty-http-webapp/src/main/resources/jetty-logging.properties b/jetty-spdy/spdy-example-webapp/src/main/resources/jetty-logging.properties similarity index 100% rename from jetty-spdy/spdy-jetty-http-webapp/src/main/resources/jetty-logging.properties rename to jetty-spdy/spdy-example-webapp/src/main/resources/jetty-logging.properties diff --git a/jetty-spdy/spdy-jetty-http-webapp/src/main/resources/keystore.jks b/jetty-spdy/spdy-example-webapp/src/main/resources/keystore.jks similarity index 100% rename from jetty-spdy/spdy-jetty-http-webapp/src/main/resources/keystore.jks rename to jetty-spdy/spdy-example-webapp/src/main/resources/keystore.jks diff --git a/jetty-spdy/spdy-jetty-http-webapp/src/main/resources/truststore.jks b/jetty-spdy/spdy-example-webapp/src/main/resources/truststore.jks similarity index 100% rename from jetty-spdy/spdy-jetty-http-webapp/src/main/resources/truststore.jks rename to jetty-spdy/spdy-example-webapp/src/main/resources/truststore.jks diff --git a/jetty-spdy/spdy-jetty-http-webapp/src/main/webapp/WEB-INF/web.xml b/jetty-spdy/spdy-example-webapp/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from jetty-spdy/spdy-jetty-http-webapp/src/main/webapp/WEB-INF/web.xml rename to jetty-spdy/spdy-example-webapp/src/main/webapp/WEB-INF/web.xml diff --git a/jetty-spdy/spdy-jetty-http-webapp/src/main/webapp/form.jsp b/jetty-spdy/spdy-example-webapp/src/main/webapp/form.jsp similarity index 100% rename from jetty-spdy/spdy-jetty-http-webapp/src/main/webapp/form.jsp rename to jetty-spdy/spdy-example-webapp/src/main/webapp/form.jsp diff --git a/jetty-spdy/spdy-jetty-http-webapp/src/main/webapp/included.jsp b/jetty-spdy/spdy-example-webapp/src/main/webapp/included.jsp similarity index 100% rename from jetty-spdy/spdy-jetty-http-webapp/src/main/webapp/included.jsp rename to jetty-spdy/spdy-example-webapp/src/main/webapp/included.jsp diff --git a/jetty-spdy/spdy-jetty-http-webapp/src/main/webapp/index.jsp b/jetty-spdy/spdy-example-webapp/src/main/webapp/index.jsp similarity index 100% rename from jetty-spdy/spdy-jetty-http-webapp/src/main/webapp/index.jsp rename to jetty-spdy/spdy-example-webapp/src/main/webapp/index.jsp diff --git a/jetty-spdy/spdy-jetty-http-webapp/src/main/webapp/logo.jpg b/jetty-spdy/spdy-example-webapp/src/main/webapp/logo.jpg similarity index 100% rename from jetty-spdy/spdy-jetty-http-webapp/src/main/webapp/logo.jpg rename to jetty-spdy/spdy-example-webapp/src/main/webapp/logo.jpg diff --git a/jetty-spdy/spdy-jetty-http-webapp/src/main/webapp/stylesheet.css b/jetty-spdy/spdy-example-webapp/src/main/webapp/stylesheet.css similarity index 100% rename from jetty-spdy/spdy-jetty-http-webapp/src/main/webapp/stylesheet.css rename to jetty-spdy/spdy-example-webapp/src/main/webapp/stylesheet.css diff --git a/jetty-spdy/spdy-jetty-http/pom.xml b/jetty-spdy/spdy-http-server/pom.xml similarity index 94% rename from jetty-spdy/spdy-jetty-http/pom.xml rename to jetty-spdy/spdy-http-server/pom.xml index 1110072855e..e388d82acff 100644 --- a/jetty-spdy/spdy-jetty-http/pom.xml +++ b/jetty-spdy/spdy-http-server/pom.xml @@ -6,8 +6,8 @@ 9.0.0-SNAPSHOT 4.0.0 - spdy-jetty-http - Jetty :: SPDY :: Jetty HTTP Layer + spdy-http-server + Jetty :: SPDY :: Jetty Server HTTP Layer @@ -47,7 +47,7 @@ org.eclipse.jetty.spdy - spdy-jetty + spdy-server ${project.version} diff --git a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HTTPSPDYHeader.java b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HTTPSPDYHeader.java similarity index 98% rename from jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HTTPSPDYHeader.java rename to jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HTTPSPDYHeader.java index 179648469f3..ef79a140f5a 100644 --- a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HTTPSPDYHeader.java +++ b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HTTPSPDYHeader.java @@ -16,7 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.spdy.http; +package org.eclipse.jetty.spdy.server.http; import java.util.HashMap; import java.util.Map; diff --git a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HTTPSPDYServerConnectionFactory.java b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HTTPSPDYServerConnectionFactory.java similarity index 94% rename from jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HTTPSPDYServerConnectionFactory.java rename to jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HTTPSPDYServerConnectionFactory.java index 4aaf9f0c15d..5ff4e82ca54 100644 --- a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HTTPSPDYServerConnectionFactory.java +++ b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HTTPSPDYServerConnectionFactory.java @@ -17,12 +17,11 @@ // -package org.eclipse.jetty.spdy.http; +package org.eclipse.jetty.spdy.server.http; import org.eclipse.jetty.io.EndPoint; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.HttpChannelConfig; -import org.eclipse.jetty.spdy.SPDYServerConnectionFactory; import org.eclipse.jetty.spdy.api.DataInfo; import org.eclipse.jetty.spdy.api.HeadersInfo; import org.eclipse.jetty.spdy.api.ReplyInfo; @@ -30,6 +29,7 @@ import org.eclipse.jetty.spdy.api.Stream; import org.eclipse.jetty.spdy.api.StreamFrameListener; import org.eclipse.jetty.spdy.api.SynInfo; import org.eclipse.jetty.spdy.api.server.ServerSessionFrameListener; +import org.eclipse.jetty.spdy.server.SPDYServerConnectionFactory; import org.eclipse.jetty.util.Fields; import org.eclipse.jetty.util.annotation.Name; import org.eclipse.jetty.util.log.Log; @@ -37,22 +37,22 @@ import org.eclipse.jetty.util.log.Logger; public class HTTPSPDYServerConnectionFactory extends SPDYServerConnectionFactory implements HttpChannelConfig.ConnectionFactory { - private static final String CHANNEL_ATTRIBUTE = "org.eclipse.jetty.spdy.http.HTTPChannelOverSPDY"; + private static final String CHANNEL_ATTRIBUTE = "org.eclipse.jetty.spdy.server.http.HTTPChannelOverSPDY"; private static final Logger logger = Log.getLogger(HTTPSPDYServerConnectionFactory.class); private final PushStrategy pushStrategy; private final HttpChannelConfig httpChannelConfig; public HTTPSPDYServerConnectionFactory( - @Name("version") int version, + @Name("version") int version, @Name("config") HttpChannelConfig config) { this(version,config,new PushStrategy.None()); } - + public HTTPSPDYServerConnectionFactory( - @Name("version") int version, - @Name("config") HttpChannelConfig config, + @Name("version") int version, + @Name("config") HttpChannelConfig config, @Name("pushStrategy") PushStrategy pushStrategy) { super(version); @@ -66,7 +66,7 @@ public class HTTPSPDYServerConnectionFactory extends SPDYServerConnectionFactory { return httpChannelConfig; } - + @Override protected ServerSessionFrameListener provideServerSessionFrameListener(Connector connector, EndPoint endPoint) { diff --git a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HTTPSPDYServerConnector.java b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HTTPSPDYServerConnector.java similarity index 94% rename from jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HTTPSPDYServerConnector.java rename to jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HTTPSPDYServerConnector.java index 5b30bf69a59..d235e4d5e15 100644 --- a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HTTPSPDYServerConnector.java +++ b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HTTPSPDYServerConnector.java @@ -17,7 +17,7 @@ // -package org.eclipse.jetty.spdy.http; +package org.eclipse.jetty.spdy.server.http; import java.util.Collections; import java.util.Map; @@ -26,12 +26,10 @@ import org.eclipse.jetty.server.AbstractConnectionFactory; import org.eclipse.jetty.server.ConnectionFactory; import org.eclipse.jetty.server.HttpChannelConfig; import org.eclipse.jetty.server.HttpConnectionFactory; -import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.spdy.NPNServerConnectionFactory; -import org.eclipse.jetty.spdy.SPDYServerConnector; +import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.spdy.api.SPDY; -import org.eclipse.jetty.spdy.http.PushStrategy.None; +import org.eclipse.jetty.spdy.server.NPNServerConnectionFactory; import org.eclipse.jetty.util.ssl.SslContextFactory; public class HTTPSPDYServerConnector extends ServerConnector @@ -59,9 +57,9 @@ public class HTTPSPDYServerConnector extends ServerConnector public HTTPSPDYServerConnector(Server server, short version, HttpChannelConfig httpChannelConfig, PushStrategy push) { super(server,new HTTPSPDYServerConnectionFactory(version,httpChannelConfig,push)); - + } - + public HTTPSPDYServerConnector(Server server, HttpChannelConfig config, SslContextFactory sslContextFactory, Map pushStrategies) { super(server,AbstractConnectionFactory.getFactories(sslContextFactory, diff --git a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HttpChannelOverSPDY.java b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HttpChannelOverSPDY.java similarity index 99% rename from jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HttpChannelOverSPDY.java rename to jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HttpChannelOverSPDY.java index ca6672c27bd..90dc33f05f5 100644 --- a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HttpChannelOverSPDY.java +++ b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HttpChannelOverSPDY.java @@ -16,7 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.spdy.http; +package org.eclipse.jetty.spdy.server.http; import java.nio.ByteBuffer; import java.util.LinkedList; diff --git a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HttpInputOverSPDY.java b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HttpInputOverSPDY.java similarity index 96% rename from jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HttpInputOverSPDY.java rename to jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HttpInputOverSPDY.java index 8e90a31b3dc..d37eb391850 100644 --- a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HttpInputOverSPDY.java +++ b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HttpInputOverSPDY.java @@ -16,7 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.spdy.http; +package org.eclipse.jetty.spdy.server.http; import org.eclipse.jetty.server.HttpInput; import org.eclipse.jetty.spdy.api.DataInfo; diff --git a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HttpTransportOverSPDY.java b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HttpTransportOverSPDY.java similarity index 99% rename from jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HttpTransportOverSPDY.java rename to jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HttpTransportOverSPDY.java index f8f7e4142d8..d60740403a8 100644 --- a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HttpTransportOverSPDY.java +++ b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HttpTransportOverSPDY.java @@ -16,7 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.spdy.http; +package org.eclipse.jetty.spdy.server.http; import java.io.IOException; import java.nio.ByteBuffer; diff --git a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/PushStrategy.java b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/PushStrategy.java similarity index 97% rename from jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/PushStrategy.java rename to jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/PushStrategy.java index 9be82d37451..6b26854f063 100644 --- a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/PushStrategy.java +++ b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/PushStrategy.java @@ -17,7 +17,7 @@ // -package org.eclipse.jetty.spdy.http; +package org.eclipse.jetty.spdy.server.http; import java.util.Collections; import java.util.Set; diff --git a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/ReferrerPushStrategy.java b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/ReferrerPushStrategy.java similarity index 99% rename from jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/ReferrerPushStrategy.java rename to jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/ReferrerPushStrategy.java index 1732997ffab..554b9fb1983 100644 --- a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/ReferrerPushStrategy.java +++ b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/ReferrerPushStrategy.java @@ -17,7 +17,7 @@ // -package org.eclipse.jetty.spdy.http; +package org.eclipse.jetty.spdy.server.http; import java.util.Arrays; import java.util.Collections; diff --git a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/HTTPSPDYProxyConnector.java b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/HTTPSPDYProxyConnector.java similarity index 93% rename from jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/HTTPSPDYProxyConnector.java rename to jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/HTTPSPDYProxyConnector.java index d135c8f177f..6348a81aaa4 100644 --- a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/HTTPSPDYProxyConnector.java +++ b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/HTTPSPDYProxyConnector.java @@ -17,12 +17,12 @@ // -package org.eclipse.jetty.spdy.proxy; +package org.eclipse.jetty.spdy.server.proxy; import org.eclipse.jetty.server.HttpChannelConfig; import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.spdy.SPDYServerConnector; import org.eclipse.jetty.spdy.api.SPDY; +import org.eclipse.jetty.spdy.server.SPDYServerConnector; import org.eclipse.jetty.util.ssl.SslContextFactory; public class HTTPSPDYProxyConnector extends SPDYServerConnector diff --git a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/ProxyEngine.java b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/ProxyEngine.java similarity index 98% rename from jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/ProxyEngine.java rename to jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/ProxyEngine.java index be24ec48d5f..1a7c34f6d75 100644 --- a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/ProxyEngine.java +++ b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/ProxyEngine.java @@ -17,7 +17,7 @@ // -package org.eclipse.jetty.spdy.proxy; +package org.eclipse.jetty.spdy.server.proxy; import java.net.InetAddress; import java.net.InetSocketAddress; diff --git a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/ProxyEngineSelector.java b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/ProxyEngineSelector.java similarity index 98% rename from jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/ProxyEngineSelector.java rename to jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/ProxyEngineSelector.java index e74fbbd168c..38ac82bb38e 100644 --- a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/ProxyEngineSelector.java +++ b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/ProxyEngineSelector.java @@ -16,7 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.spdy.proxy; +package org.eclipse.jetty.spdy.server.proxy; import java.net.InetSocketAddress; import java.util.HashMap; @@ -32,7 +32,7 @@ import org.eclipse.jetty.spdy.api.StreamFrameListener; import org.eclipse.jetty.spdy.api.StreamStatus; import org.eclipse.jetty.spdy.api.SynInfo; import org.eclipse.jetty.spdy.api.server.ServerSessionFrameListener; -import org.eclipse.jetty.spdy.http.HTTPSPDYHeader; +import org.eclipse.jetty.spdy.server.http.HTTPSPDYHeader; import org.eclipse.jetty.util.Fields; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; diff --git a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/ProxyHTTPConnectionFactory.java b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/ProxyHTTPConnectionFactory.java similarity index 95% rename from jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/ProxyHTTPConnectionFactory.java rename to jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/ProxyHTTPConnectionFactory.java index 6e3380b2647..e2e274f351f 100644 --- a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/ProxyHTTPConnectionFactory.java +++ b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/ProxyHTTPConnectionFactory.java @@ -17,14 +17,13 @@ // -package org.eclipse.jetty.spdy.proxy; +package org.eclipse.jetty.spdy.server.proxy; import org.eclipse.jetty.http.HttpVersion; import org.eclipse.jetty.io.Connection; import org.eclipse.jetty.io.EndPoint; import org.eclipse.jetty.server.AbstractConnectionFactory; -import org.eclipse.jetty.server.ConnectionFactory; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.HttpChannelConfig; diff --git a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/ProxyHTTPSPDYConnection.java b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/ProxyHTTPSPDYConnection.java similarity index 99% rename from jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/ProxyHTTPSPDYConnection.java rename to jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/ProxyHTTPSPDYConnection.java index babb325426d..478fca7d6e5 100644 --- a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/ProxyHTTPSPDYConnection.java +++ b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/ProxyHTTPSPDYConnection.java @@ -16,7 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.spdy.proxy; +package org.eclipse.jetty.spdy.server.proxy; import java.io.IOException; import java.nio.ByteBuffer; @@ -49,7 +49,7 @@ import org.eclipse.jetty.spdy.api.SessionStatus; import org.eclipse.jetty.spdy.api.Stream; import org.eclipse.jetty.spdy.api.StreamFrameListener; import org.eclipse.jetty.spdy.api.SynInfo; -import org.eclipse.jetty.spdy.http.HTTPSPDYHeader; +import org.eclipse.jetty.spdy.server.http.HTTPSPDYHeader; import org.eclipse.jetty.util.Callback; import org.eclipse.jetty.util.Fields; diff --git a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/SPDYProxyEngine.java b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/SPDYProxyEngine.java similarity index 98% rename from jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/SPDYProxyEngine.java rename to jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/SPDYProxyEngine.java index de7e6851965..d0f5bf37a54 100644 --- a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/SPDYProxyEngine.java +++ b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/SPDYProxyEngine.java @@ -17,7 +17,7 @@ // -package org.eclipse.jetty.spdy.proxy; +package org.eclipse.jetty.spdy.server.proxy; import java.net.InetSocketAddress; import java.util.LinkedList; @@ -26,7 +26,6 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.TimeUnit; -import org.eclipse.jetty.spdy.SPDYClient; import org.eclipse.jetty.spdy.api.ByteBufferDataInfo; import org.eclipse.jetty.spdy.api.DataInfo; import org.eclipse.jetty.spdy.api.GoAwayInfo; @@ -40,7 +39,8 @@ import org.eclipse.jetty.spdy.api.Stream; import org.eclipse.jetty.spdy.api.StreamFrameListener; import org.eclipse.jetty.spdy.api.StreamStatus; import org.eclipse.jetty.spdy.api.SynInfo; -import org.eclipse.jetty.spdy.http.HTTPSPDYHeader; +import org.eclipse.jetty.spdy.client.SPDYClient; +import org.eclipse.jetty.spdy.server.http.HTTPSPDYHeader; import org.eclipse.jetty.util.Callback; import org.eclipse.jetty.util.Fields; @@ -50,8 +50,8 @@ import org.eclipse.jetty.util.Fields; */ public class SPDYProxyEngine extends ProxyEngine implements StreamFrameListener { - private static final String STREAM_HANDLER_ATTRIBUTE = "org.eclipse.jetty.spdy.http.proxy.streamHandler"; - private static final String CLIENT_STREAM_ATTRIBUTE = "org.eclipse.jetty.spdy.http.proxy.clientStream"; + private static final String STREAM_HANDLER_ATTRIBUTE = "org.eclipse.jetty.spdy.server.http.proxy.streamHandler"; + private static final String CLIENT_STREAM_ATTRIBUTE = "org.eclipse.jetty.spdy.server.http.proxy.clientStream"; private final ConcurrentMap serverSessions = new ConcurrentHashMap<>(); private final SessionFrameListener sessionListener = new ProxySessionFrameListener(); diff --git a/jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/AbstractHTTPSPDYTest.java b/jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/AbstractHTTPSPDYTest.java similarity index 96% rename from jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/AbstractHTTPSPDYTest.java rename to jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/AbstractHTTPSPDYTest.java index 1a6d22144ea..d6b9067c152 100644 --- a/jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/AbstractHTTPSPDYTest.java +++ b/jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/AbstractHTTPSPDYTest.java @@ -16,7 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.spdy.http; +package org.eclipse.jetty.spdy.server.http; import java.net.InetSocketAddress; import java.util.Arrays; @@ -24,15 +24,13 @@ import java.util.Collection; import java.util.concurrent.Executor; import java.util.concurrent.TimeUnit; -import org.eclipse.jetty.server.ConnectionFactory; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.HttpChannelConfig; import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.spdy.SPDYClient; -import org.eclipse.jetty.spdy.SPDYServerConnector; import org.eclipse.jetty.spdy.api.SPDY; import org.eclipse.jetty.spdy.api.Session; import org.eclipse.jetty.spdy.api.SessionFrameListener; +import org.eclipse.jetty.spdy.client.SPDYClient; import org.eclipse.jetty.util.thread.QueuedThreadPool; import org.junit.After; import org.junit.Rule; diff --git a/jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/ConcurrentStreamsTest.java b/jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/ConcurrentStreamsTest.java similarity index 99% rename from jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/ConcurrentStreamsTest.java rename to jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/ConcurrentStreamsTest.java index fb8fe43f340..c3a5f31179f 100644 --- a/jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/ConcurrentStreamsTest.java +++ b/jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/ConcurrentStreamsTest.java @@ -16,7 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.spdy.http; +package org.eclipse.jetty.spdy.server.http; import java.io.IOException; import java.util.concurrent.CountDownLatch; diff --git a/jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/ProtocolNegotiationTest.java b/jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/ProtocolNegotiationTest.java similarity index 98% rename from jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/ProtocolNegotiationTest.java rename to jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/ProtocolNegotiationTest.java index 3680ee229b0..83f0fa95d73 100644 --- a/jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/ProtocolNegotiationTest.java +++ b/jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/ProtocolNegotiationTest.java @@ -17,7 +17,7 @@ // -package org.eclipse.jetty.spdy.http; +package org.eclipse.jetty.spdy.server.http; import java.io.BufferedReader; import java.io.InputStream; @@ -31,7 +31,7 @@ import javax.net.ssl.SSLSocket; import org.eclipse.jetty.npn.NextProtoNego; import org.eclipse.jetty.server.HttpConnectionFactory; import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.spdy.SPDYServerConnector; +import org.eclipse.jetty.spdy.server.SPDYServerConnector; import org.eclipse.jetty.util.ssl.SslContextFactory; import org.junit.Assert; import org.junit.Rule; diff --git a/jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/PushStrategyBenchmarkTest.java b/jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/PushStrategyBenchmarkTest.java similarity index 99% rename from jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/PushStrategyBenchmarkTest.java rename to jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/PushStrategyBenchmarkTest.java index e0bae830f77..5ff3bd49536 100644 --- a/jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/PushStrategyBenchmarkTest.java +++ b/jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/PushStrategyBenchmarkTest.java @@ -17,7 +17,7 @@ // -package org.eclipse.jetty.spdy.http; +package org.eclipse.jetty.spdy.server.http; import java.io.IOException; import java.net.InetSocketAddress; diff --git a/jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/ReferrerPushStrategyTest.java b/jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/ReferrerPushStrategyTest.java similarity index 99% rename from jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/ReferrerPushStrategyTest.java rename to jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/ReferrerPushStrategyTest.java index 036afdecd76..fe14a42383e 100644 --- a/jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/ReferrerPushStrategyTest.java +++ b/jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/ReferrerPushStrategyTest.java @@ -16,7 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.spdy.http; +package org.eclipse.jetty.spdy.server.http; import java.io.IOException; import java.io.PrintWriter; @@ -31,8 +31,6 @@ import org.eclipse.jetty.server.ConnectionFactory; import org.eclipse.jetty.server.HttpChannelConfig; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; -import org.eclipse.jetty.spdy.NPNServerConnectionFactory; -import org.eclipse.jetty.spdy.SPDYServerConnector; import org.eclipse.jetty.spdy.api.DataInfo; import org.eclipse.jetty.spdy.api.ReplyInfo; import org.eclipse.jetty.spdy.api.SPDY; @@ -41,6 +39,7 @@ import org.eclipse.jetty.spdy.api.SessionFrameListener; import org.eclipse.jetty.spdy.api.Stream; import org.eclipse.jetty.spdy.api.StreamFrameListener; import org.eclipse.jetty.spdy.api.SynInfo; +import org.eclipse.jetty.spdy.server.NPNServerConnectionFactory; import org.eclipse.jetty.util.Fields; import org.junit.Assert; import org.junit.Test; @@ -77,7 +76,7 @@ public class ReferrerPushStrategyTest extends AbstractHTTPSPDYTest connector.getConnectionFactory(NPNServerConnectionFactory.class).setDefaultProtocol(defaultFactory.getProtocol()); else connector.setDefaultProtocol(defaultFactory.getProtocol()); - + connector.setDefaultProtocol(defaultFactory.getProtocol()); // TODO I don't think this is right Fields mainRequestHeaders = createHeadersWithoutReferrer(mainResource); diff --git a/jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/ReferrerPushStrategyUnitTest.java b/jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/ReferrerPushStrategyUnitTest.java similarity index 99% rename from jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/ReferrerPushStrategyUnitTest.java rename to jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/ReferrerPushStrategyUnitTest.java index 641b7407d30..28e7cb11f31 100644 --- a/jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/ReferrerPushStrategyUnitTest.java +++ b/jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/ReferrerPushStrategyUnitTest.java @@ -16,7 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.spdy.http; +package org.eclipse.jetty.spdy.server.http; import java.util.Set; diff --git a/jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/SSLExternalServerTest.java b/jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/SSLExternalServerTest.java similarity index 97% rename from jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/SSLExternalServerTest.java rename to jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/SSLExternalServerTest.java index 43b828bef78..8c74c0e1a0a 100644 --- a/jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/SSLExternalServerTest.java +++ b/jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/SSLExternalServerTest.java @@ -16,7 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.spdy.http; +package org.eclipse.jetty.spdy.server.http; import java.io.IOException; import java.net.InetSocketAddress; @@ -27,12 +27,12 @@ import java.util.concurrent.TimeUnit; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.eclipse.jetty.spdy.SPDYClient; import org.eclipse.jetty.spdy.api.ReplyInfo; import org.eclipse.jetty.spdy.api.Session; import org.eclipse.jetty.spdy.api.Stream; import org.eclipse.jetty.spdy.api.StreamFrameListener; import org.eclipse.jetty.spdy.api.SynInfo; +import org.eclipse.jetty.spdy.client.SPDYClient; import org.eclipse.jetty.util.Fields; import org.eclipse.jetty.util.ssl.SslContextFactory; import org.junit.Assert; diff --git a/jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/ServerHTTPSPDYTest.java b/jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/ServerHTTPSPDYTest.java similarity index 99% rename from jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/ServerHTTPSPDYTest.java rename to jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/ServerHTTPSPDYTest.java index 21eba341990..39cf294beb1 100644 --- a/jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/ServerHTTPSPDYTest.java +++ b/jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/ServerHTTPSPDYTest.java @@ -16,7 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.spdy.http; +package org.eclipse.jetty.spdy.server.http; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; diff --git a/jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/proxy/ProxyHTTPSPDYTest.java b/jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/proxy/ProxyHTTPSPDYTest.java similarity index 99% rename from jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/proxy/ProxyHTTPSPDYTest.java rename to jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/proxy/ProxyHTTPSPDYTest.java index 8ca2cdaaeba..c383de7dd77 100644 --- a/jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/proxy/ProxyHTTPSPDYTest.java +++ b/jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/proxy/ProxyHTTPSPDYTest.java @@ -16,7 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.spdy.proxy; +package org.eclipse.jetty.spdy.server.proxy; import java.io.BufferedReader; import java.io.ByteArrayOutputStream; @@ -31,9 +31,6 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.spdy.SPDYClient; -import org.eclipse.jetty.spdy.SPDYServerConnector; -import org.eclipse.jetty.spdy.SPDYServerConnectionFactory; import org.eclipse.jetty.spdy.api.BytesDataInfo; import org.eclipse.jetty.spdy.api.DataInfo; import org.eclipse.jetty.spdy.api.GoAwayInfo; @@ -48,7 +45,10 @@ import org.eclipse.jetty.spdy.api.StreamFrameListener; import org.eclipse.jetty.spdy.api.StreamStatus; import org.eclipse.jetty.spdy.api.SynInfo; import org.eclipse.jetty.spdy.api.server.ServerSessionFrameListener; -import org.eclipse.jetty.spdy.http.HTTPSPDYHeader; +import org.eclipse.jetty.spdy.client.SPDYClient; +import org.eclipse.jetty.spdy.server.SPDYServerConnectionFactory; +import org.eclipse.jetty.spdy.server.SPDYServerConnector; +import org.eclipse.jetty.spdy.server.http.HTTPSPDYHeader; import org.eclipse.jetty.util.Callback; import org.eclipse.jetty.util.Fields; import org.junit.After; diff --git a/jetty-spdy/spdy-jetty-http/src/test/resources/jetty-logging.properties b/jetty-spdy/spdy-http-server/src/test/resources/jetty-logging.properties similarity index 100% rename from jetty-spdy/spdy-jetty-http/src/test/resources/jetty-logging.properties rename to jetty-spdy/spdy-http-server/src/test/resources/jetty-logging.properties diff --git a/jetty-spdy/spdy-jetty-http/src/test/resources/keystore.jks b/jetty-spdy/spdy-http-server/src/test/resources/keystore.jks similarity index 100% rename from jetty-spdy/spdy-jetty-http/src/test/resources/keystore.jks rename to jetty-spdy/spdy-http-server/src/test/resources/keystore.jks diff --git a/jetty-spdy/spdy-jetty-http/src/test/resources/truststore.jks b/jetty-spdy/spdy-http-server/src/test/resources/truststore.jks similarity index 100% rename from jetty-spdy/spdy-jetty-http/src/test/resources/truststore.jks rename to jetty-spdy/spdy-http-server/src/test/resources/truststore.jks diff --git a/jetty-spdy/spdy-jetty-http-webapp/src/main/config/etc/jetty-spdy.xml b/jetty-spdy/spdy-jetty-http-webapp/src/main/config/etc/jetty-spdy.xml deleted file mode 100644 index a6a15f0de0b..00000000000 --- a/jetty-spdy/spdy-jetty-http-webapp/src/main/config/etc/jetty-spdy.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - /etc/keystore - OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4 - OBF:1u2u1wml1z7s1z7a1wnl1u2g - /etc/keystore - OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4 - - - - - - - - - - - - - - - - - - .*\.css - .*\.js - .*\.png - .*\.jpg - .*\.gif - - - - - - - - - - - - - - - - - npn - - - - - - - - - spdy/3 - spdy/2 - http/1.1 - - - http/1.1 - - - - - - 3 - - - - - - - - 2 - - - - - - - - - - - - - 8443 - 30000 - - - - - - - diff --git a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/EmptyEndPoint.java b/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/EmptyEndPoint.java deleted file mode 100644 index bada1ee976f..00000000000 --- a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/EmptyEndPoint.java +++ /dev/null @@ -1,148 +0,0 @@ -// -// ======================================================================== -// Copyright (c) 1995-2012 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.spdy; - -import java.io.IOException; -import java.net.InetSocketAddress; -import java.nio.ByteBuffer; -import java.nio.channels.ReadPendingException; -import java.nio.channels.WritePendingException; - -import org.eclipse.jetty.io.Connection; -import org.eclipse.jetty.io.EndPoint; -import org.eclipse.jetty.util.Callback; - -public class EmptyEndPoint implements EndPoint -{ - private boolean checkForIdle; - private Connection connection; - private boolean oshut; - private boolean closed; - private long maxIdleTime; - - @Override - public long getCreatedTimeStamp() - { - return 0; - } - - @Override - public Connection getConnection() - { - return connection; - } - - @Override - public void setConnection(Connection connection) - { - this.connection = connection; - } - - @Override - public void shutdownOutput() - { - oshut = true; - } - - @Override - public boolean isOutputShutdown() - { - return oshut; - } - - @Override - public boolean isInputShutdown() - { - return false; - } - - @Override - public void close() - { - closed = true; - } - - @Override - public int fill(ByteBuffer buffer) throws IOException - { - return 0; - } - - @Override - public boolean flush(ByteBuffer... buffer) throws IOException - { - return false; - } - - @Override - public InetSocketAddress getLocalAddress() - { - return null; - } - - @Override - public InetSocketAddress getRemoteAddress() - { - return null; - } - - @Override - public boolean isOpen() - { - return !closed; - } - - @Override - public Object getTransport() - { - return null; - } - - @Override - public long getIdleTimeout() - { - return maxIdleTime; - } - - @Override - public void setIdleTimeout(long timeMs) - { - this.maxIdleTime = timeMs; - } - - @Override - public void onOpen() - { - } - - @Override - public void onClose() - { - } - - @Override - public void fillInterested(C context, Callback callback) throws ReadPendingException - { - } - - @Override - public void write(C context, Callback callback, ByteBuffer... buffers) throws WritePendingException - { - } -} diff --git a/jetty-spdy/spdy-server/pom.xml b/jetty-spdy/spdy-server/pom.xml new file mode 100644 index 00000000000..14c2143c929 --- /dev/null +++ b/jetty-spdy/spdy-server/pom.xml @@ -0,0 +1,82 @@ + + + + org.eclipse.jetty.spdy + spdy-parent + 9.0.0-SNAPSHOT + + + 4.0.0 + spdy-server + Jetty :: SPDY :: Jetty Server Binding + + + + + maven-dependency-plugin + + + copy + generate-resources + + copy + + + + + org.mortbay.jetty.npn + npn-boot + ${npn.version} + jar + false + ${project.build.directory}/npn + + + + + + + + maven-surefire-plugin + + -Xbootclasspath/p:${project.build.directory}/npn/npn-boot-${npn.version}.jar + + + + + + + + org.eclipse.jetty.spdy + spdy-core + ${project.version} + + + org.eclipse.jetty.spdy + spdy-client + ${project.version} + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty.npn + npn-api + ${npn.version} + provided + + + junit + junit + test + + + org.hamcrest + hamcrest-all + test + + + + diff --git a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/NPNServerConnectionFactory.java b/jetty-spdy/spdy-server/src/main/java/org/eclipse/jetty/spdy/server/NPNServerConnectionFactory.java similarity index 97% rename from jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/NPNServerConnectionFactory.java rename to jetty-spdy/spdy-server/src/main/java/org/eclipse/jetty/spdy/server/NPNServerConnectionFactory.java index 559f5ac7a34..0be4c749b3f 100644 --- a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/NPNServerConnectionFactory.java +++ b/jetty-spdy/spdy-server/src/main/java/org/eclipse/jetty/spdy/server/NPNServerConnectionFactory.java @@ -17,7 +17,7 @@ // -package org.eclipse.jetty.spdy; +package org.eclipse.jetty.spdy.server; import java.util.Arrays; import java.util.Iterator; @@ -81,7 +81,7 @@ public class NPNServerConnectionFactory extends AbstractConnectionFactory @Override public Connection newConnection(Connector connector, EndPoint endPoint) { - List protocols=_protocols; + List protocols=_protocols; if (protocols==null || protocols.size()==0) { protocols=connector.getProtocols(); @@ -92,11 +92,11 @@ public class NPNServerConnectionFactory extends AbstractConnectionFactory i.remove(); } } - + String dft=_defaultProtocol; if (dft==null) dft=_protocols.get(0); - + return new NextProtoNegoServerConnection((DecryptedEndPoint)endPoint, connector,protocols,_defaultProtocol); } diff --git a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/NextProtoNegoServerConnection.java b/jetty-spdy/spdy-server/src/main/java/org/eclipse/jetty/spdy/server/NextProtoNegoServerConnection.java similarity index 98% rename from jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/NextProtoNegoServerConnection.java rename to jetty-spdy/spdy-server/src/main/java/org/eclipse/jetty/spdy/server/NextProtoNegoServerConnection.java index 13cbe877d9c..c567d149604 100644 --- a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/NextProtoNegoServerConnection.java +++ b/jetty-spdy/spdy-server/src/main/java/org/eclipse/jetty/spdy/server/NextProtoNegoServerConnection.java @@ -16,7 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.spdy; +package org.eclipse.jetty.spdy.server; import java.io.IOException; import java.util.List; diff --git a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYServerConnectionFactory.java b/jetty-spdy/spdy-server/src/main/java/org/eclipse/jetty/spdy/server/SPDYServerConnectionFactory.java similarity index 94% rename from jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYServerConnectionFactory.java rename to jetty-spdy/spdy-server/src/main/java/org/eclipse/jetty/spdy/server/SPDYServerConnectionFactory.java index ddbb5fd1654..6489247452b 100644 --- a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYServerConnectionFactory.java +++ b/jetty-spdy/spdy-server/src/main/java/org/eclipse/jetty/spdy/server/SPDYServerConnectionFactory.java @@ -16,7 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.spdy; +package org.eclipse.jetty.spdy.server; import java.util.Collection; import java.util.Collections; @@ -28,8 +28,14 @@ import org.eclipse.jetty.io.Connection; import org.eclipse.jetty.io.EndPoint; import org.eclipse.jetty.server.AbstractConnectionFactory; import org.eclipse.jetty.server.Connector; +import org.eclipse.jetty.spdy.CompressionFactory; +import org.eclipse.jetty.spdy.FlowControlStrategy; +import org.eclipse.jetty.spdy.StandardCompressionFactory; +import org.eclipse.jetty.spdy.StandardSession; import org.eclipse.jetty.spdy.api.Session; import org.eclipse.jetty.spdy.api.server.ServerSessionFrameListener; +import org.eclipse.jetty.spdy.client.FlowControlStrategyFactory; +import org.eclipse.jetty.spdy.client.SPDYConnection; import org.eclipse.jetty.spdy.generator.Generator; import org.eclipse.jetty.spdy.parser.Parser; @@ -39,7 +45,7 @@ public class SPDYServerConnectionFactory extends AbstractConnectionFactory private final ServerSessionFrameListener listener; private int initialWindowSize; private final Queue sessions = new ConcurrentLinkedQueue<>(); - + public SPDYServerConnectionFactory(int version) { this(version, null); @@ -62,7 +68,7 @@ public class SPDYServerConnectionFactory extends AbstractConnectionFactory { return listener; } - + @Override public Connection newConnection(Connector connector, EndPoint endPoint) { diff --git a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYServerConnector.java b/jetty-spdy/spdy-server/src/main/java/org/eclipse/jetty/spdy/server/SPDYServerConnector.java similarity index 98% rename from jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYServerConnector.java rename to jetty-spdy/spdy-server/src/main/java/org/eclipse/jetty/spdy/server/SPDYServerConnector.java index f0958b27c6a..94f9d9e7cba 100644 --- a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYServerConnector.java +++ b/jetty-spdy/spdy-server/src/main/java/org/eclipse/jetty/spdy/server/SPDYServerConnector.java @@ -16,12 +16,12 @@ // ======================================================================== // -package org.eclipse.jetty.spdy; +package org.eclipse.jetty.spdy.server; import org.eclipse.jetty.server.ConnectionFactory; import org.eclipse.jetty.server.HttpConnectionFactory; -import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.spdy.api.SPDY; import org.eclipse.jetty.spdy.api.server.ServerSessionFrameListener; import org.eclipse.jetty.util.ssl.SslContextFactory; @@ -46,7 +46,7 @@ public class SPDYServerConnector extends ServerConnector new SPDYServerConnectionFactory(SPDY.V3, listener)}); if (getConnectionFactory(NPNServerConnectionFactory.class)!=null) getConnectionFactory(NPNServerConnectionFactory.class).setDefaultProtocol("http/1.1"); - + } } diff --git a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/AbstractTest.java b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/AbstractTest.java similarity index 98% rename from jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/AbstractTest.java rename to jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/AbstractTest.java index cd0ba942ee0..fa32ce72b18 100644 --- a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/AbstractTest.java +++ b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/AbstractTest.java @@ -17,7 +17,7 @@ // -package org.eclipse.jetty.spdy; +package org.eclipse.jetty.spdy.server; import java.net.InetSocketAddress; import java.util.concurrent.Executor; @@ -29,6 +29,7 @@ import org.eclipse.jetty.spdy.api.SPDY; import org.eclipse.jetty.spdy.api.Session; import org.eclipse.jetty.spdy.api.SessionFrameListener; import org.eclipse.jetty.spdy.api.server.ServerSessionFrameListener; +import org.eclipse.jetty.spdy.client.SPDYClient; import org.eclipse.jetty.util.ssl.SslContextFactory; import org.eclipse.jetty.util.thread.QueuedThreadPool; import org.junit.After; @@ -68,17 +69,17 @@ public abstract class AbstractTest connector = newSPDYServerConnector(server, listener); if (listener == null) listener = connector.getConnectionFactory(SPDYServerConnectionFactory.class).getServerSessionFrameListener(); - + ConnectionFactory spdy = new SPDYServerConnectionFactory(version, listener); connector.addConnectionFactory(spdy); connector.setPort(0); server.addConnector(connector); - + if (connector.getConnectionFactory(NPNServerConnectionFactory.class)!=null) connector.getConnectionFactory(NPNServerConnectionFactory.class).setDefaultProtocol(spdy.getProtocol()); else connector.setDefaultProtocol(spdy.getProtocol()); - + server.start(); return new InetSocketAddress("localhost", connector.getLocalPort()); } @@ -109,7 +110,7 @@ public abstract class AbstractTest clientFactory = newSPDYClientFactory(threadPool); clientFactory.start(); } - + return clientFactory.newSPDYClient(version).connect(socketAddress, listener).get(5, TimeUnit.SECONDS); } diff --git a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/ClosedStreamTest.java b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/ClosedStreamTest.java similarity index 99% rename from jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/ClosedStreamTest.java rename to jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/ClosedStreamTest.java index 49ddc2c661d..4060c192e89 100644 --- a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/ClosedStreamTest.java +++ b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/ClosedStreamTest.java @@ -16,11 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.spdy; - -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.not; -import static org.junit.Assert.assertThat; +package org.eclipse.jetty.spdy.server; import java.io.IOException; import java.net.InetSocketAddress; @@ -31,6 +27,7 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import org.eclipse.jetty.io.MappedByteBufferPool; +import org.eclipse.jetty.spdy.StandardCompressionFactory; import org.eclipse.jetty.spdy.api.BytesDataInfo; import org.eclipse.jetty.spdy.api.DataInfo; import org.eclipse.jetty.spdy.api.GoAwayInfo; @@ -56,6 +53,10 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.not; +import static org.junit.Assert.assertThat; + public class ClosedStreamTest extends AbstractTest { //TODO: Right now it sends a rst as the stream is unknown to the session once it's closed. diff --git a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/FlowControlTest.java b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/FlowControlTest.java similarity index 99% rename from jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/FlowControlTest.java rename to jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/FlowControlTest.java index 1327154a58a..733d5725324 100644 --- a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/FlowControlTest.java +++ b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/FlowControlTest.java @@ -17,10 +17,7 @@ // -package org.eclipse.jetty.spdy; - -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; +package org.eclipse.jetty.spdy.server; import java.nio.ByteBuffer; import java.util.concurrent.Callable; @@ -48,6 +45,9 @@ import org.eclipse.jetty.spdy.api.server.ServerSessionFrameListener; import org.junit.Assert; import org.junit.Test; +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; + public class FlowControlTest extends AbstractTest { @Test @@ -189,7 +189,7 @@ public class FlowControlTest extends AbstractTest } } }); - + DataInfo dataInfo = exchanger.exchange(null, 5, TimeUnit.SECONDS); checkThatWeAreFlowControlStalled(exchanger); diff --git a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/GoAwayTest.java b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/GoAwayTest.java similarity index 99% rename from jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/GoAwayTest.java rename to jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/GoAwayTest.java index a2503fe12a8..804c98f9129 100644 --- a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/GoAwayTest.java +++ b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/GoAwayTest.java @@ -16,7 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.spdy; +package org.eclipse.jetty.spdy.server; import java.nio.channels.ClosedChannelException; import java.util.concurrent.CountDownLatch; diff --git a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/HeadersTest.java b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/HeadersTest.java similarity index 98% rename from jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/HeadersTest.java rename to jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/HeadersTest.java index a86ffbb3c3b..b93466b96c0 100644 --- a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/HeadersTest.java +++ b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/HeadersTest.java @@ -17,7 +17,7 @@ // -package org.eclipse.jetty.spdy; +package org.eclipse.jetty.spdy.server; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; diff --git a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/IdleTimeoutTest.java b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/IdleTimeoutTest.java similarity index 99% rename from jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/IdleTimeoutTest.java rename to jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/IdleTimeoutTest.java index 9161b7f419c..75db07ba24c 100644 --- a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/IdleTimeoutTest.java +++ b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/IdleTimeoutTest.java @@ -17,7 +17,7 @@ // -package org.eclipse.jetty.spdy; +package org.eclipse.jetty.spdy.server; import java.net.InetSocketAddress; import java.util.concurrent.CountDownLatch; @@ -32,6 +32,7 @@ import org.eclipse.jetty.spdy.api.Stream; import org.eclipse.jetty.spdy.api.StreamFrameListener; import org.eclipse.jetty.spdy.api.SynInfo; import org.eclipse.jetty.spdy.api.server.ServerSessionFrameListener; +import org.eclipse.jetty.spdy.client.SPDYClient; import org.eclipse.jetty.util.thread.QueuedThreadPool; import org.junit.Assert; import org.junit.Test; diff --git a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/PingTest.java b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/PingTest.java similarity index 98% rename from jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/PingTest.java rename to jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/PingTest.java index 5e078d6ab2f..d0fb0bcd094 100644 --- a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/PingTest.java +++ b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/PingTest.java @@ -17,7 +17,7 @@ // -package org.eclipse.jetty.spdy; +package org.eclipse.jetty.spdy.server; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; diff --git a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/ProtocolViolationsTest.java b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/ProtocolViolationsTest.java similarity index 98% rename from jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/ProtocolViolationsTest.java rename to jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/ProtocolViolationsTest.java index f3fdb626c4d..0514c75f074 100644 --- a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/ProtocolViolationsTest.java +++ b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/ProtocolViolationsTest.java @@ -16,10 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.spdy; - -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; +package org.eclipse.jetty.spdy.server; import java.net.InetSocketAddress; import java.nio.ByteBuffer; @@ -29,6 +26,7 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import org.eclipse.jetty.io.MappedByteBufferPool; +import org.eclipse.jetty.spdy.StandardCompressionFactory; import org.eclipse.jetty.spdy.api.BytesDataInfo; import org.eclipse.jetty.spdy.api.DataInfo; import org.eclipse.jetty.spdy.api.HeadersInfo; @@ -49,6 +47,9 @@ import org.eclipse.jetty.util.Fields; import org.junit.Assert; import org.junit.Test; +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; + public class ProtocolViolationsTest extends AbstractTest { @Test diff --git a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/PushStreamTest.java b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/PushStreamTest.java similarity index 99% rename from jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/PushStreamTest.java rename to jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/PushStreamTest.java index 84fbc1de144..1909ede7707 100644 --- a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/PushStreamTest.java +++ b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/PushStreamTest.java @@ -17,13 +17,7 @@ // -package org.eclipse.jetty.spdy; - -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.notNullValue; -import static org.hamcrest.Matchers.sameInstance; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.fail; +package org.eclipse.jetty.spdy.server; import java.io.IOException; import java.net.InetSocketAddress; @@ -40,6 +34,7 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; import org.eclipse.jetty.io.MappedByteBufferPool; +import org.eclipse.jetty.spdy.StandardCompressionFactory; import org.eclipse.jetty.spdy.api.BytesDataInfo; import org.eclipse.jetty.spdy.api.DataInfo; import org.eclipse.jetty.spdy.api.GoAwayInfo; @@ -69,6 +64,12 @@ import org.eclipse.jetty.util.Fields; import org.junit.Assert; import org.junit.Test; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.notNullValue; +import static org.hamcrest.Matchers.sameInstance; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.fail; + public class PushStreamTest extends AbstractTest { @Test diff --git a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/ResetStreamTest.java b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/ResetStreamTest.java similarity index 99% rename from jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/ResetStreamTest.java rename to jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/ResetStreamTest.java index 51793191b6c..a7fb8fef134 100644 --- a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/ResetStreamTest.java +++ b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/ResetStreamTest.java @@ -16,13 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.spdy; - -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; +package org.eclipse.jetty.spdy.server; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; @@ -41,6 +35,12 @@ import org.eclipse.jetty.spdy.api.server.ServerSessionFrameListener; import org.eclipse.jetty.util.Callback; import org.junit.Test; +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + public class ResetStreamTest extends AbstractTest { @Test diff --git a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SPDYClientFactoryTest.java b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SPDYClientFactoryTest.java similarity index 98% rename from jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SPDYClientFactoryTest.java rename to jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SPDYClientFactoryTest.java index 8bba13d6e67..46a7b911e86 100644 --- a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SPDYClientFactoryTest.java +++ b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SPDYClientFactoryTest.java @@ -17,13 +17,12 @@ // -package org.eclipse.jetty.spdy; +package org.eclipse.jetty.spdy.server; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import junit.framework.Assert; - import org.eclipse.jetty.spdy.api.GoAwayInfo; import org.eclipse.jetty.spdy.api.Session; import org.eclipse.jetty.spdy.api.server.ServerSessionFrameListener; diff --git a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SPDYServerConnectorTest.java b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SPDYServerConnectorTest.java similarity index 98% rename from jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SPDYServerConnectorTest.java rename to jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SPDYServerConnectorTest.java index 8b6906bebd6..8a2308b4ad7 100644 --- a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SPDYServerConnectorTest.java +++ b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SPDYServerConnectorTest.java @@ -17,13 +17,12 @@ // -package org.eclipse.jetty.spdy; +package org.eclipse.jetty.spdy.server; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import junit.framework.Assert; - import org.eclipse.jetty.spdy.api.GoAwayInfo; import org.eclipse.jetty.spdy.api.Session; import org.eclipse.jetty.spdy.api.SessionFrameListener; diff --git a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SSLEngineLeakTest.java b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SSLEngineLeakTest.java similarity index 97% rename from jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SSLEngineLeakTest.java rename to jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SSLEngineLeakTest.java index bd4ecaee848..07fceb2f82e 100644 --- a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SSLEngineLeakTest.java +++ b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SSLEngineLeakTest.java @@ -16,7 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.spdy; +package org.eclipse.jetty.spdy.server; import java.lang.reflect.Field; import java.util.Map; @@ -27,6 +27,7 @@ import org.eclipse.jetty.npn.NextProtoNego; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.spdy.api.Session; import org.eclipse.jetty.spdy.api.server.ServerSessionFrameListener; +import org.eclipse.jetty.spdy.client.SPDYClient; import org.eclipse.jetty.util.ssl.SslContextFactory; import org.junit.Assert; import org.junit.Ignore; diff --git a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SSLSynReplyTest.java b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SSLSynReplyTest.java similarity index 95% rename from jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SSLSynReplyTest.java rename to jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SSLSynReplyTest.java index 5aad237ff46..cf261d5996b 100644 --- a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SSLSynReplyTest.java +++ b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SSLSynReplyTest.java @@ -17,13 +17,14 @@ // -package org.eclipse.jetty.spdy; +package org.eclipse.jetty.spdy.server; import java.util.concurrent.Executor; import org.eclipse.jetty.npn.NextProtoNego; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.spdy.api.server.ServerSessionFrameListener; +import org.eclipse.jetty.spdy.client.SPDYClient; import org.eclipse.jetty.util.ssl.SslContextFactory; import org.junit.Before; diff --git a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SettingsTest.java b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SettingsTest.java similarity index 99% rename from jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SettingsTest.java rename to jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SettingsTest.java index f244b2f5cfc..e4711f3022b 100644 --- a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SettingsTest.java +++ b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SettingsTest.java @@ -17,7 +17,7 @@ // -package org.eclipse.jetty.spdy; +package org.eclipse.jetty.spdy.server; import java.net.InetSocketAddress; import java.util.concurrent.CountDownLatch; diff --git a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SynDataReplyDataLoadTest.java b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SynDataReplyDataLoadTest.java similarity index 99% rename from jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SynDataReplyDataLoadTest.java rename to jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SynDataReplyDataLoadTest.java index cc64ce56cc4..a3e436724b7 100644 --- a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SynDataReplyDataLoadTest.java +++ b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SynDataReplyDataLoadTest.java @@ -17,7 +17,7 @@ // -package org.eclipse.jetty.spdy; +package org.eclipse.jetty.spdy.server; import java.nio.ByteBuffer; import java.util.ArrayList; diff --git a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SynReplyTest.java b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SynReplyTest.java similarity index 99% rename from jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SynReplyTest.java rename to jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SynReplyTest.java index ae440a0b5f2..51f6c4f255a 100644 --- a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SynReplyTest.java +++ b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SynReplyTest.java @@ -16,7 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.spdy; +package org.eclipse.jetty.spdy.server; import java.io.ByteArrayOutputStream; import java.nio.ByteBuffer; diff --git a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/UnsupportedVersionTest.java b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/UnsupportedVersionTest.java similarity index 97% rename from jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/UnsupportedVersionTest.java rename to jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/UnsupportedVersionTest.java index b7fc238d40b..e671052e404 100644 --- a/jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/UnsupportedVersionTest.java +++ b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/UnsupportedVersionTest.java @@ -16,7 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.spdy; +package org.eclipse.jetty.spdy.server; import java.net.InetSocketAddress; import java.nio.ByteBuffer; @@ -25,6 +25,7 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import org.eclipse.jetty.io.MappedByteBufferPool; +import org.eclipse.jetty.spdy.StandardCompressionFactory; import org.eclipse.jetty.spdy.api.SPDY; import org.eclipse.jetty.spdy.api.Stream; import org.eclipse.jetty.spdy.api.StreamFrameListener; diff --git a/jetty-spdy/spdy-jetty/src/test/resources/jetty-logging.properties b/jetty-spdy/spdy-server/src/test/resources/jetty-logging.properties similarity index 100% rename from jetty-spdy/spdy-jetty/src/test/resources/jetty-logging.properties rename to jetty-spdy/spdy-server/src/test/resources/jetty-logging.properties diff --git a/jetty-spdy/spdy-jetty/src/test/resources/keystore.jks b/jetty-spdy/spdy-server/src/test/resources/keystore.jks similarity index 100% rename from jetty-spdy/spdy-jetty/src/test/resources/keystore.jks rename to jetty-spdy/spdy-server/src/test/resources/keystore.jks diff --git a/jetty-spdy/spdy-jetty/src/test/resources/truststore.jks b/jetty-spdy/spdy-server/src/test/resources/truststore.jks similarity index 100% rename from jetty-spdy/spdy-jetty/src/test/resources/truststore.jks rename to jetty-spdy/spdy-server/src/test/resources/truststore.jks