Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.TXT (renamed from README.txt)0
-rw-r--r--VERSION.txt78
-rw-r--r--aggregates/jetty-all/pom.xml88
-rw-r--r--aggregates/jetty-websocket-all/pom.xml163
-rw-r--r--examples/async-rest/async-rest-jar/pom.xml7
-rw-r--r--examples/async-rest/async-rest-jar/src/main/java/org/eclipse/jetty/example/asyncrest/AsyncRestServlet.java3
-rw-r--r--examples/async-rest/async-rest-webapp/pom.xml7
-rw-r--r--examples/async-rest/pom.xml2
-rw-r--r--examples/embedded/pom.xml6
-rw-r--r--examples/embedded/src/main/java/org/eclipse/jetty/embedded/SecuredHelloHandler.java1
-rw-r--r--examples/pom.xml2
-rw-r--r--jetty-annotations/pom.xml8
-rw-r--r--jetty-annotations/src/main/config/modules/annotations.mod17
-rw-r--r--jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java17
-rw-r--r--jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationDecorator.java116
-rw-r--r--jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java20
-rw-r--r--jetty-annotations/src/main/java/org/eclipse/jetty/annotations/ClassInheritanceHandler.java11
-rw-r--r--jetty-annotations/src/main/java/org/eclipse/jetty/annotations/PostConstructAnnotationHandler.java2
-rw-r--r--jetty-annotations/src/main/java/org/eclipse/jetty/annotations/PreDestroyAnnotationHandler.java2
-rw-r--r--jetty-annotations/src/main/java/org/eclipse/jetty/annotations/ResourceAnnotationHandler.java2
-rw-r--r--jetty-annotations/src/main/java/org/eclipse/jetty/annotations/ServletSecurityAnnotationHandler.java12
-rw-r--r--jetty-annotations/src/main/java/org/eclipse/jetty/annotations/Util.java36
-rw-r--r--jetty-annotations/src/main/java/org/eclipse/jetty/annotations/WebFilterAnnotation.java2
-rw-r--r--jetty-annotations/src/main/java/org/eclipse/jetty/annotations/WebListenerAnnotation.java6
-rw-r--r--jetty-annotations/src/main/java/org/eclipse/jetty/annotations/WebServletAnnotation.java2
-rw-r--r--jetty-annotations/src/test/java/org/eclipse/jetty/annotations/TestAnnotationParser.java5
-rw-r--r--jetty-annotations/src/test/java/org/eclipse/jetty/annotations/TestSecurityAnnotationConversions.java17
-rwxr-xr-xjetty-ant/pom.xml2
-rw-r--r--jetty-ant/src/main/java/org/eclipse/jetty/ant/AntWebAppContext.java7
-rw-r--r--jetty-ant/src/main/java/org/eclipse/jetty/ant/JettyRunTask.java12
-rw-r--r--jetty-ant/src/main/java/org/eclipse/jetty/ant/utils/ServerProxy.java3
-rw-r--r--jetty-client/pom.xml272
-rw-r--r--jetty-client/src/main/config/modules/client.mod7
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/AbstractHttpClientTransport.java233
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/HttpChannel.java76
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java250
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/HttpClientTransport.java79
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java241
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/HttpContent.java156
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java268
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/HttpExchange.java116
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/HttpReceiver.java572
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/HttpRedirector.java320
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/HttpRequest.java45
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/HttpResponse.java2
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/HttpSender.java1068
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/MultiplexHttpDestination.java135
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/RedirectProtocolHandler.java198
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/api/Connection.java2
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/api/Request.java11
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/api/Response.java2
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpChannelOverHTTP.java111
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpClientTransportOverHTTP.java56
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpConnectionOverHTTP.java175
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpConnectionPool.java207
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpDestinationOverHTTP.java186
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpReceiverOverHTTP.java243
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpSenderOverHTTP.java235
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/package-info.java18
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/util/BufferingResponseListener.java5
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/util/DigestAuthentication.java2
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/util/InputStreamContentProvider.java126
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/util/InputStreamResponseListener.java5
-rw-r--r--jetty-client/src/test/java/org/eclipse/jetty/client/ExternalSiteTest.java2
-rw-r--r--jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientAuthenticationTest.java15
-rw-r--r--jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientContinueTest.java37
-rw-r--r--jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientExplicitConnectionTest.java19
-rw-r--r--jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientLoadTest.java90
-rw-r--r--jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientProxyTest.java2
-rw-r--r--jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientRedirectTest.java51
-rw-r--r--jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientSynchronizationTest.java4
-rw-r--r--jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java30
-rw-r--r--jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTimeoutTest.java5
-rw-r--r--jetty-client/src/test/java/org/eclipse/jetty/client/HttpConnectionLifecycleTest.java88
-rw-r--r--jetty-client/src/test/java/org/eclipse/jetty/client/HttpReceiverTest.java418
-rw-r--r--jetty-client/src/test/java/org/eclipse/jetty/client/HttpRequestAbortTest.java6
-rw-r--r--jetty-client/src/test/java/org/eclipse/jetty/client/HttpSenderTest.java533
-rw-r--r--jetty-client/src/test/java/org/eclipse/jetty/client/api/Usage.java4
-rw-r--r--jetty-client/src/test/java/org/eclipse/jetty/client/http/HttpDestinationOverHTTPTest.java (renamed from jetty-client/src/test/java/org/eclipse/jetty/client/HttpDestinationTest.java)46
-rw-r--r--jetty-client/src/test/java/org/eclipse/jetty/client/ssl/SslBytesServerTest.java80
-rw-r--r--jetty-continuation/pom.xml8
-rw-r--r--jetty-continuation/src/main/java/org/eclipse/jetty/continuation/Servlet3Continuation.java2
-rw-r--r--jetty-deploy/pom.xml11
-rw-r--r--jetty-deploy/src/main/config/etc/jetty-deploy.xml5
-rw-r--r--jetty-deploy/src/main/config/modules/deploy.mod17
-rw-r--r--jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/WebAppProvider.java2
-rw-r--r--jetty-distribution/pom.xml131
-rw-r--r--jetty-distribution/src/main/resources/README.TXT53
-rw-r--r--jetty-distribution/src/main/resources/README.txt62
-rw-r--r--jetty-distribution/src/main/resources/demo-base/webapps/README.TXT12
-rw-r--r--jetty-distribution/src/main/resources/demo-base/webapps/ROOT/images/jetty-header.jpg (renamed from jetty-distribution/src/main/resources/webapps.demo/ROOT/images/jetty-header.jpg)bin103289 -> 103289 bytes
-rw-r--r--jetty-distribution/src/main/resources/demo-base/webapps/ROOT/images/webtide_logo.jpg (renamed from jetty-distribution/src/main/resources/webapps.demo/ROOT/images/webtide_logo.jpg)bin17678 -> 17678 bytes
-rw-r--r--jetty-distribution/src/main/resources/demo-base/webapps/ROOT/index.html (renamed from jetty-distribution/src/main/resources/webapps.demo/ROOT/index.html)0
-rw-r--r--jetty-distribution/src/main/resources/demo-base/webapps/ROOT/jetty.css (renamed from jetty-distribution/src/main/resources/webapps.demo/ROOT/jetty.css)0
-rw-r--r--jetty-distribution/src/main/resources/demo-base/webapps/example-moved.xml (renamed from jetty-distribution/src/main/resources/webapps.demo/example-moved.xml)0
-rw-r--r--jetty-distribution/src/main/resources/demo-base/webapps/javadoc.xml (renamed from jetty-distribution/src/main/resources/webapps.demo/javadoc.xml)0
-rw-r--r--jetty-distribution/src/main/resources/modules/.donotdelete (renamed from jetty-start/src/test/resources/jetty.home/lib/JSR.ZIP)0
-rw-r--r--jetty-distribution/src/main/resources/modules/setuid.mod14
-rw-r--r--jetty-distribution/src/main/resources/start.d/900-demo.ini59
-rw-r--r--jetty-distribution/src/main/resources/start.d/README.TXT24
-rw-r--r--jetty-distribution/src/main/resources/start.ini230
-rw-r--r--jetty-distribution/src/main/resources/webapps.demo/README.TXT7
-rw-r--r--jetty-distribution/src/main/resources/webapps/README.TXT8
-rw-r--r--jetty-http-spi/pom.xml2
-rw-r--r--jetty-http/pom.xml4
-rw-r--r--jetty-http/src/main/java/org/eclipse/jetty/http/HttpContent.java31
-rw-r--r--jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java17
-rw-r--r--jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java743
-rw-r--r--jetty-http/src/test/java/org/eclipse/jetty/http/HttpParserTest.java250
-rw-r--r--jetty-io/pom.xml2
-rw-r--r--jetty-io/src/main/java/org/eclipse/jetty/io/AbstractConnection.java495
-rw-r--r--jetty-io/src/main/java/org/eclipse/jetty/io/AbstractEndPoint.java16
-rw-r--r--jetty-io/src/main/java/org/eclipse/jetty/io/ArrayByteBufferPool.java2
-rw-r--r--jetty-io/src/main/java/org/eclipse/jetty/io/ChannelEndPoint.java7
-rw-r--r--jetty-io/src/main/java/org/eclipse/jetty/io/Connection.java2
-rw-r--r--jetty-io/src/main/java/org/eclipse/jetty/io/FillInterest.java8
-rw-r--r--jetty-io/src/main/java/org/eclipse/jetty/io/NetworkTrafficListener.java2
-rw-r--r--jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java124
-rw-r--r--jetty-io/src/main/java/org/eclipse/jetty/io/WriteFlusher.java13
-rw-r--r--jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java4
-rw-r--r--jetty-jaas/pom.xml7
-rw-r--r--jetty-jaas/src/main/config/modules/jaas.mod17
-rw-r--r--jetty-jaspi/pom.xml4
-rw-r--r--jetty-jmx/pom.xml2
-rw-r--r--jetty-jmx/src/main/config/modules/jmx.mod16
-rw-r--r--jetty-jmx/src/main/java/org/eclipse/jetty/jmx/ObjectMBean.java6
-rw-r--r--jetty-jndi/pom.xml21
-rw-r--r--jetty-jndi/src/main/config/modules/jndi.mod11
-rw-r--r--jetty-jndi/src/main/java/org/eclipse/jetty/jndi/ContextFactory.java2
-rw-r--r--jetty-jsp/pom.xml63
-rw-r--r--jetty-jsp/src/main/config/modules/jsp.mod10
-rw-r--r--jetty-jspc-maven-plugin/pom.xml2
-rw-r--r--jetty-maven-plugin/pom.xml17
-rw-r--r--jetty-monitor/README.TXT (renamed from jetty-monitor/README.txt)0
-rw-r--r--jetty-monitor/pom.xml2
-rw-r--r--jetty-monitor/src/main/config/modules/monitor.mod13
-rw-r--r--jetty-monitor/src/test/resources/jetty-logging.properties2
-rw-r--r--jetty-nosql/pom.xml21
-rw-r--r--jetty-nosql/src/main/config/modules/nosql.mod9
-rw-r--r--jetty-nosql/src/main/java/org/eclipse/jetty/nosql/NoSqlSessionManager.java1
-rw-r--r--jetty-osgi/jetty-osgi-boot-jsp/pom.xml45
-rw-r--r--jetty-osgi/jetty-osgi-boot-warurl/pom.xml2
-rw-r--r--jetty-osgi/jetty-osgi-boot/pom.xml8
-rw-r--r--jetty-osgi/jetty-osgi-httpservice/pom.xml14
-rw-r--r--jetty-osgi/jetty-osgi-npn/pom.xml2
-rw-r--r--jetty-osgi/pom.xml2
-rw-r--r--jetty-osgi/test-jetty-osgi-context/pom.xml22
-rw-r--r--jetty-osgi/test-jetty-osgi-webapp/pom.xml14
-rw-r--r--jetty-osgi/test-jetty-osgi/pom.xml23
-rw-r--r--jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootContextAsService.java20
-rw-r--r--jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootCore.java6
-rw-r--r--jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootSpdy.java1
-rw-r--r--jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWebAppAsService.java32
-rw-r--r--jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWithJsp.java26
-rw-r--r--jetty-overlay-deployer/pom.xml6
-rw-r--r--jetty-overlay-deployer/src/main/config/modules/overlay.mod13
-rw-r--r--jetty-plus/pom.xml11
-rw-r--r--jetty-plus/src/main/config/modules/plus.mod15
-rw-r--r--jetty-plus/src/main/java/org/eclipse/jetty/plus/annotation/ContainerInitializer.java6
-rw-r--r--jetty-plus/src/main/java/org/eclipse/jetty/plus/annotation/RunAs.java6
-rw-r--r--jetty-plus/src/main/java/org/eclipse/jetty/plus/annotation/RunAsCollection.java2
-rw-r--r--jetty-plus/src/main/java/org/eclipse/jetty/plus/webapp/PlusDecorator.java91
-rw-r--r--jetty-proxy/pom.xml13
-rw-r--r--jetty-proxy/src/main/config/modules/proxy.mod14
-rw-r--r--jetty-proxy/src/main/java/org/eclipse/jetty/proxy/BalancerServlet.java10
-rw-r--r--jetty-proxy/src/main/java/org/eclipse/jetty/proxy/ProxyServlet.java2
-rw-r--r--jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ProxyTunnellingTest.java2
-rw-r--r--jetty-rewrite/pom.xml8
-rw-r--r--jetty-rewrite/src/main/config/modules/rewrite.mod13
-rw-r--r--jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/CompactPathRule.java56
-rw-r--r--jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RewriteHandler.java8
-rw-r--r--jetty-rhttp/README.TXT (renamed from jetty-rhttp/README.txt)0
-rw-r--r--jetty-rhttp/jetty-rhttp-connector/pom.xml2
-rw-r--r--jetty-rhttp/jetty-rhttp-gateway/pom.xml2
-rw-r--r--jetty-runner/pom.xml2
-rw-r--r--jetty-security/pom.xml4
-rw-r--r--jetty-security/src/main/config/modules/security.mod9
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/AbstractUserAuthentication.java95
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/Authenticator.java18
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/ConstraintAware.java16
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/ConstraintSecurityHandler.java318
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/DefaultUserIdentity.java23
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/HashCrossContextPsuedoSession.java6
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/RoleInfo.java27
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/SecurityHandler.java4
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/UserAuthentication.java25
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/authentication/DeferredAuthentication.java29
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/authentication/FormAuthenticator.java86
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/authentication/LoginAuthenticator.java22
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/authentication/SessionAuthentication.java27
-rw-r--r--jetty-security/src/test/java/org/eclipse/jetty/security/ConstraintTest.java283
-rw-r--r--jetty-security/src/test/java/org/eclipse/jetty/security/SpecExampleConstraintTest.java41
-rw-r--r--jetty-server/pom.xml8
-rw-r--r--jetty-server/src/main/config/etc/jetty-http.xml4
-rw-r--r--jetty-server/src/main/config/etc/jetty-https.xml4
-rw-r--r--jetty-server/src/main/config/etc/jetty-ipaccess.xml13
-rw-r--r--jetty-server/src/main/config/etc/jetty-requestlog.xml2
-rw-r--r--jetty-server/src/main/config/etc/jetty-ssl.xml4
-rw-r--r--jetty-server/src/main/config/modules/debug.mod9
-rw-r--r--jetty-server/src/main/config/modules/ext.mod2
-rw-r--r--jetty-server/src/main/config/modules/http.mod13
-rw-r--r--jetty-server/src/main/config/modules/https.mod13
-rw-r--r--jetty-server/src/main/config/modules/ipaccess.mod9
-rw-r--r--jetty-server/src/main/config/modules/jvm.mod24
-rw-r--r--jetty-server/src/main/config/modules/lowresources.mod17
-rw-r--r--jetty-server/src/main/config/modules/requestlog.mod17
-rw-r--r--jetty-server/src/main/config/modules/resources.mod2
-rw-r--r--jetty-server/src/main/config/modules/server.mod33
-rw-r--r--jetty-server/src/main/config/modules/ssl.mod26
-rw-r--r--jetty-server/src/main/config/modules/stats.mod9
-rw-r--r--jetty-server/src/main/config/modules/xinetd.mod9
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/AbstractConnector.java20
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/AsyncContextState.java11
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/ByteBufferQueuedHttpInput.java (renamed from jetty-server/src/main/java/org/eclipse/jetty/server/ByteBufferHttpInput.java)11
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/EncodingHttpWriter.java6
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/ForwardedRequestCustomizer.java10
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/Handler.java4
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java101
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannelState.java464
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java378
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java451
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/HttpInputOverHTTP.java168
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java669
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/HttpTransport.java4
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/Iso88591HttpWriter.java6
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java1
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/NetworkConnector.java1
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/QueuedHttpInput.java160
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/Request.java90
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/ResourceCache.java46
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/Response.java61
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java2
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/ServletRequestHttpWrapper.java28
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/ServletResponseHttpWrapper.java5
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/Utf8HttpWriter.java6
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java80
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java4
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/handler/StatisticsHandler.java12
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSession.java6
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionManager.java29
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/session/HashSessionManager.java6
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionManager.java4
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/session/SessionHandler.java8
-rw-r--r--jetty-server/src/test/java/org/eclipse/jetty/server/AbstractHttpTest.java11
-rw-r--r--jetty-server/src/test/java/org/eclipse/jetty/server/ConnectionOpenCloseTest.java62
-rw-r--r--jetty-server/src/test/java/org/eclipse/jetty/server/DumpHandler.java2
-rw-r--r--jetty-server/src/test/java/org/eclipse/jetty/server/HalfCloseRaceTest.java85
-rw-r--r--jetty-server/src/test/java/org/eclipse/jetty/server/HalfCloseTest.java217
-rw-r--r--jetty-server/src/test/java/org/eclipse/jetty/server/HttpConnectionTest.java57
-rw-r--r--jetty-server/src/test/java/org/eclipse/jetty/server/HttpOutputTest.java305
-rw-r--r--jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java73
-rw-r--r--jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestFixture.java6
-rw-r--r--jetty-server/src/test/java/org/eclipse/jetty/server/HttpWriterTest.java2
-rw-r--r--jetty-server/src/test/java/org/eclipse/jetty/server/LocalConnectorTest.java10
-rw-r--r--jetty-server/src/test/java/org/eclipse/jetty/server/LowResourcesMonitorTest.java2
-rw-r--r--jetty-server/src/test/java/org/eclipse/jetty/server/NetworkTrafficListenerTest.java19
-rw-r--r--jetty-server/src/test/java/org/eclipse/jetty/server/RequestTest.java85
-rw-r--r--jetty-server/src/test/java/org/eclipse/jetty/server/ResponseTest.java12
-rw-r--r--jetty-servlet/pom.xml21
-rw-r--r--jetty-servlet/src/main/config/modules/servlet.mod9
-rw-r--r--jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ErrorPageErrorHandler.java34
-rw-r--r--jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterHolder.java14
-rw-r--r--jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletContextHandler.java98
-rw-r--r--jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java128
-rw-r--r--jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletMapping.java2
-rw-r--r--jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextDispatchWithQueryStrings.java5
-rw-r--r--jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncIOServletTest.java259
-rw-r--r--jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletIOTest.java377
-rw-r--r--jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletTest.java4
-rw-r--r--jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ErrorPageTest.java4
-rw-r--r--jetty-servlet/src/test/resources/jetty-logging.properties1
-rw-r--r--jetty-servlets/pom.xml31
-rw-r--r--jetty-servlets/src/main/config/modules/servlets.mod10
-rw-r--r--jetty-servlets/src/main/java/org/eclipse/jetty/servlets/DataRateLimitedServlet.java315
-rw-r--r--jetty-servlets/src/main/java/org/eclipse/jetty/servlets/DoSFilter.java2
-rw-r--r--jetty-servlets/src/main/java/org/eclipse/jetty/servlets/GzipFilter.java1
-rw-r--r--jetty-servlets/src/main/java/org/eclipse/jetty/servlets/gzip/AbstractCompressedStream.java22
-rw-r--r--jetty-servlets/src/test/java/org/eclipse/jetty/servlets/AbstractDoSFilterTest.java54
-rw-r--r--jetty-servlets/src/test/java/org/eclipse/jetty/servlets/DataRateLimitedServletTest.java109
-rw-r--r--jetty-spdy/pom.xml6
-rw-r--r--jetty-spdy/spdy-client/pom.xml6
-rw-r--r--jetty-spdy/spdy-client/src/main/java/org/eclipse/jetty/spdy/client/SPDYClient.java95
-rw-r--r--jetty-spdy/spdy-client/src/main/java/org/eclipse/jetty/spdy/client/SPDYConnection.java3
-rw-r--r--jetty-spdy/spdy-core/pom.xml3
-rw-r--r--jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardSession.java9
-rw-r--r--jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardStream.java27
-rw-r--r--jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/Session.java5
-rw-r--r--jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/SessionFrameListener.java5
-rw-r--r--jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/Stream.java19
-rw-r--r--jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/StreamFrameListener.java14
-rw-r--r--jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/parser/ControlFrameParser.java38
-rw-r--r--jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/parser/Parser.java71
-rw-r--r--jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/parser/SynStreamBodyParser.java29
-rw-r--r--jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/AsyncTimeoutTest.java8
-rw-r--r--jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/StandardSessionTest.java13
-rw-r--r--jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/StandardStreamTest.java84
-rw-r--r--jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/parser/BrokenFrameTest.java287
-rw-r--r--jetty-spdy/spdy-example-webapp/pom.xml6
-rw-r--r--jetty-spdy/spdy-http-client-transport/pom.xml101
-rw-r--r--jetty-spdy/spdy-http-client-transport/src/main/java/org/eclipse/jetty/spdy/client/http/HttpChannelOverSPDY.java75
-rw-r--r--jetty-spdy/spdy-http-client-transport/src/main/java/org/eclipse/jetty/spdy/client/http/HttpClientTransportOverSPDY.java96
-rw-r--r--jetty-spdy/spdy-http-client-transport/src/main/java/org/eclipse/jetty/spdy/client/http/HttpConnectionOverSPDY.java54
-rw-r--r--jetty-spdy/spdy-http-client-transport/src/main/java/org/eclipse/jetty/spdy/client/http/HttpDestinationOverSPDY.java37
-rw-r--r--jetty-spdy/spdy-http-client-transport/src/main/java/org/eclipse/jetty/spdy/client/http/HttpReceiverOverSPDY.java151
-rw-r--r--jetty-spdy/spdy-http-client-transport/src/main/java/org/eclipse/jetty/spdy/client/http/HttpSenderOverSPDY.java118
-rw-r--r--jetty-spdy/spdy-http-client-transport/src/test/java/org/eclipse/jetty/spdy/client/http/AbstractHttpClientServerTest.java82
-rw-r--r--jetty-spdy/spdy-http-client-transport/src/test/java/org/eclipse/jetty/spdy/client/http/EmptyServerHandler.java36
-rw-r--r--jetty-spdy/spdy-http-client-transport/src/test/java/org/eclipse/jetty/spdy/client/http/HttpClientTest.java422
-rw-r--r--jetty-spdy/spdy-http-client-transport/src/test/resources/jetty-logging.properties4
-rw-r--r--jetty-spdy/spdy-http-client-transport/src/test/resources/keystore.jksbin0 -> 2206 bytes
-rw-r--r--jetty-spdy/spdy-http-client-transport/src/test/resources/truststore.jksbin0 -> 916 bytes
-rw-r--r--jetty-spdy/spdy-http-common/pom.xml48
-rw-r--r--jetty-spdy/spdy-http-common/src/main/java/org/eclipse/jetty/spdy/http/HTTPSPDYHeader.java (renamed from jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HTTPSPDYHeader.java)2
-rw-r--r--jetty-spdy/spdy-http-server/pom.xml13
-rw-r--r--jetty-spdy/spdy-http-server/src/main/config/etc/jetty-spdy.xml14
-rw-r--r--jetty-spdy/spdy-http-server/src/main/config/modules/npn.mod7
-rw-r--r--jetty-spdy/spdy-http-server/src/main/config/modules/spdy.mod15
-rw-r--r--jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HTTPSPDYServerConnectionFactory.java14
-rw-r--r--jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HttpChannelOverSPDY.java85
-rw-r--r--jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HttpInputOverSPDY.java10
-rw-r--r--jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HttpTransportOverSPDY.java18
-rw-r--r--jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/ReferrerPushStrategy.java47
-rw-r--r--jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/HTTPProxyEngine.java4
-rw-r--r--jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/ProxyEngine.java2
-rw-r--r--jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/ProxyEngineSelector.java2
-rw-r--r--jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/ProxyHTTPSPDYConnection.java109
-rw-r--r--jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/proxy/SPDYProxyEngine.java16
-rw-r--r--jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/AbstractHTTPSPDYTest.java13
-rw-r--r--jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/ConcurrentStreamsTest.java4
-rw-r--r--jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/HttpTransportOverSPDYTest.java22
-rw-r--r--jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/PushStrategyBenchmarkTest.java5
-rw-r--r--jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/ReferrerPushStrategyTest.java16
-rw-r--r--jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/ReferrerPushStrategyUnitTest.java1
-rw-r--r--jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/SPDYTestUtils.java1
-rw-r--r--jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/SSLExternalServerTest.java1
-rw-r--r--jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/ServerHTTPSPDYTest.java236
-rw-r--r--jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/proxy/ProxyHTTPToSPDYTest.java2
-rw-r--r--jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/proxy/ProxySPDYToHTTPLoadTest.java109
-rw-r--r--jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/proxy/ProxySPDYToHTTPTest.java20
-rw-r--r--jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/proxy/ProxySPDYToSPDYLoadTest.java21
-rw-r--r--jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/proxy/ProxySPDYToSPDYTest.java16
-rw-r--r--jetty-spdy/spdy-http-server/src/test/resources/jetty-logging.properties1
-rw-r--r--jetty-spdy/spdy-server/pom.xml6
-rw-r--r--jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/AbstractTest.java3
-rw-r--r--jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/IdleTimeoutTest.java6
-rw-r--r--jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SettingsTest.java2
-rw-r--r--jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/UnsupportedVersionTest.java3
-rw-r--r--jetty-spring/pom.xml2
-rw-r--r--jetty-start/pom.xml2
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/BaseHome.java385
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/Classpath.java189
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/CommandLineBuilder.java120
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/Config.java1002
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/FS.java169
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/FileArg.java111
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/FilenameComparator.java70
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/JarVersion.java52
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/Main.java1424
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/Module.java349
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/ModuleGraphWriter.java257
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java361
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/NaturalSort.java56
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/README.TXT (renamed from jetty-start/src/main/java/org/eclipse/jetty/start/README.txt)13
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java842
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/StartIni.java52
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/StartLog.java149
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/TextFile.java129
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/UsageException.java50
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/Version.java125
-rw-r--r--jetty-start/src/main/resources/org/eclipse/jetty/start/start.config166
-rw-r--r--jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt195
-rw-r--r--jetty-start/src/test/java/org/eclipse/jetty/start/BaseHomeTest.java142
-rw-r--r--jetty-start/src/test/java/org/eclipse/jetty/start/ConfigTest.java649
-rw-r--r--jetty-start/src/test/java/org/eclipse/jetty/start/ConfigurationAssert.java256
-rw-r--r--jetty-start/src/test/java/org/eclipse/jetty/start/MainTest.java168
-rw-r--r--jetty-start/src/test/java/org/eclipse/jetty/start/ModuleGraphWriterTest.java60
-rw-r--r--jetty-start/src/test/java/org/eclipse/jetty/start/ModuleTest.java51
-rw-r--r--jetty-start/src/test/java/org/eclipse/jetty/start/ModulesTest.java175
-rw-r--r--jetty-start/src/test/java/org/eclipse/jetty/start/PropertyDump.java33
-rw-r--r--jetty-start/src/test/java/org/eclipse/jetty/start/PropertyPassingTest.java48
-rw-r--r--jetty-start/src/test/java/org/eclipse/jetty/start/TestUseCases.java70
-rw-r--r--jetty-start/src/test/resources/assert-home-with-jvm.txt44
-rw-r--r--jetty-start/src/test/resources/assert-home-with-spaces.txt11
-rw-r--r--jetty-start/src/test/resources/assert-home.txt37
-rw-r--r--jetty-start/src/test/resources/empty.home/start.ini3
-rw-r--r--jetty-start/src/test/resources/extra-libs/example.jar (renamed from jetty-start/src/test/resources/jetty.home/lib/example.jar)0
-rw-r--r--jetty-start/src/test/resources/extra-resources/example.properties (renamed from jetty-start/src/test/resources/jetty.home/resources/example.properties)0
-rw-r--r--jetty-start/src/test/resources/hb.1/base/start.d/jmx.ini (renamed from jetty-start/src/test/resources/jetty.home/lib/LOGGING.JAR)0
-rw-r--r--jetty-start/src/test/resources/hb.1/base/start.d/logging.ini1
-rw-r--r--jetty-start/src/test/resources/hb.1/base/start.d/myapp.ini (renamed from jetty-start/src/test/resources/jetty.home/lib/ext/custom-impl.jar)0
-rw-r--r--jetty-start/src/test/resources/hb.1/base/start.ini7
-rw-r--r--jetty-start/src/test/resources/hb.1/home/start.d/jmx.ini (renamed from jetty-start/src/test/resources/jetty.home/lib/spec.zip)0
-rw-r--r--jetty-start/src/test/resources/hb.1/home/start.d/jndi.ini0
-rw-r--r--jetty-start/src/test/resources/hb.1/home/start.d/jsp.ini0
-rw-r--r--jetty-start/src/test/resources/hb.1/home/start.d/logging.ini1
-rw-r--r--jetty-start/src/test/resources/hb.1/home/start.d/ssl.ini0
-rw-r--r--jetty-start/src/test/resources/hb.1/home/start.ini11
-rw-r--r--jetty-start/src/test/resources/jetty home with spaces/lib/example of a library with spaces.jar0
-rw-r--r--jetty-start/src/test/resources/jetty home with spaces/modules/base.mod2
-rw-r--r--jetty-start/src/test/resources/jetty home with spaces/start.ini6
-rw-r--r--jetty-start/src/test/resources/jetty.home/etc/test-jetty-security.xml1
-rw-r--r--jetty-start/src/test/resources/jetty.home/etc/test-jetty-ssl.xml1
-rw-r--r--jetty-start/src/test/resources/jetty.home/etc/test-jetty.xml1
-rw-r--r--jetty-start/src/test/resources/jetty.home/lib/core.jarbin1177 -> 0 bytes
-rw-r--r--jetty-start/src/test/resources/jetty.home/lib/foo/bar/foobar.jarbin1172 -> 0 bytes
-rw-r--r--jetty-start/src/test/resources/jetty.home/lib/http.jarbin1172 -> 0 bytes
-rw-r--r--jetty-start/src/test/resources/jetty.home/lib/io.jarbin1167 -> 0 bytes
-rw-r--r--jetty-start/src/test/resources/jetty.home/lib/readme.txt5
-rw-r--r--jetty-start/src/test/resources/jetty.home/lib/server.jarbin1175 -> 0 bytes
-rw-r--r--jetty-start/src/test/resources/jetty.home/lib/util.jarbin1189 -> 0 bytes
-rw-r--r--jetty-start/src/test/resources/jetty.home/lib/xml.jarbin1206 -> 0 bytes
-rw-r--r--jetty-start/src/test/resources/jetty.home/start.d/10-jmx.ini22
-rw-r--r--jetty-start/src/test/resources/jetty.home/start.d/20-websocket.ini13
-rw-r--r--jetty-start/src/test/resources/jetty.home/start.d/90-testrealm.ini1
-rw-r--r--jetty-start/src/test/resources/jetty.home/start.ini76
-rw-r--r--jetty-start/src/test/resources/property-dump-start.config8
-rw-r--r--jetty-start/src/test/resources/test-alt.xml1
-rw-r--r--jetty-start/src/test/resources/usecases/assert-barebones.txt16
-rw-r--r--jetty-start/src/test/resources/usecases/assert-enable-spdy.txt36
-rw-r--r--jetty-start/src/test/resources/usecases/assert-jmx.txt18
-rw-r--r--jetty-start/src/test/resources/usecases/assert-with-db.txt31
-rw-r--r--jetty-start/src/test/resources/usecases/assert-with-module-persistence.txt44
-rw-r--r--jetty-start/src/test/resources/usecases/base.barebones/start.ini5
-rw-r--r--jetty-start/src/test/resources/usecases/base.enable.spdy/start.ini12
-rw-r--r--jetty-start/src/test/resources/usecases/base.jmx/start.ini4
-rw-r--r--jetty-start/src/test/resources/usecases/base.with.db/etc/jetty-db.xml1
-rw-r--r--jetty-start/src/test/resources/usecases/base.with.db/lib/db/bonecp.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/base.with.db/lib/db/mysql-driver.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/base.with.db/modules/db.mod11
-rw-r--r--jetty-start/src/test/resources/usecases/base.with.db/start.ini7
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/README.spnego0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jdbcRealm.properties0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-annotations.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-contexts.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-debug.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-demo.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-deploy.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-http.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-https.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-ipaccess.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-jaas.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-jmx.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-logging.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-lowresources.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-monitor.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-plus.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-proxy.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-requestlog.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-rewrite.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-setuid.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-spdy-proxy.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-spdy.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-ssl.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-started.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-stats.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-testrealm.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-webapps.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-websockets.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty-xinetd.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty.conf0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/jetty.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/keystore0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/krb5.ini0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/realm.properties0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/spnego.conf0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/spnego.properties0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/test-realm.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/etc/webdefault.xml0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/annotations/javax.annotation-api-1.2.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/annotations/org.objectweb.asm-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/ext/.nodelete0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jetty-annotations-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jetty-client-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jetty-continuation-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jetty-deploy-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jetty-http-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jetty-io-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jetty-jaas-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jetty-jmx-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jetty-jndi-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jetty-jsp-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jetty-plus-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jetty-proxy-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jetty-rewrite-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jetty-schemas-3.1.RC0.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jetty-schemas-3.1.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jetty-security-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jetty-server-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jetty-servlet-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jetty-servlets-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jetty-util-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jetty-webapp-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jetty-xml-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jndi/javax.activation-1.1.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jndi/javax.transaction-api-1.2.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jsp/javax.el-3.0.0.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp-2.3.2.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp-api-2.3.1.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp.jstl-1.2.0.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jsp/org.apache.taglibs.standard.glassfish-1.2.0.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jsp/org.eclipse.jdt.core-3.8.2.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/monitor/jetty-monitor-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/servlet-api-3.1.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/setuid/jetty-setuid-java-1.0.1.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/setuid/libsetuid-linux.so0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/setuid/libsetuid-osx.so0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/spdy/spdy-client-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/spdy/spdy-core-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/spdy/spdy-http-common-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/spdy/spdy-http-server-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/spdy/spdy-server-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/websocket/javax-websocket-client-impl-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/websocket/javax-websocket-server-impl-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/websocket/javax.websocket-api-1.0.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/websocket/websocket-api-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/websocket/websocket-client-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/websocket/websocket-common-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/websocket/websocket-server-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/websocket/websocket-servlet-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/annotations.mod17
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/base.mod11
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/client.mod7
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/debug.mod9
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/deploy.mod14
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/http.mod9
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/https.mod10
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/ipaccess.mod9
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/jaas.mod14
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/jmx.mod11
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/jndi.mod11
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/jsp.mod10
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/lowresources.mod9
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/monitor.mod13
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/npn.mod6
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/plus.mod15
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/proxy.mod14
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/requestlog.mod9
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/rewrite.mod13
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/security.mod9
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/server.mod18
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/servlet.mod9
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/spdy.mod11
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/stats.mod9
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/webapp.mod9
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/websocket.mod17
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/xinetd.mod9
-rw-r--r--jetty-start/src/test/resources/usecases/home/modules/xml.mod10
-rw-r--r--jetty-start/src/test/resources/usecases/home/resources/.nodelete0
-rw-r--r--jetty-start/src/test/resources/usecases/home/start.ini2
-rw-r--r--jetty-util-ajax/pom.xml8
-rw-r--r--jetty-util-ajax/src/main/java/org/eclipse/jetty/util/ajax/JSON.java2
-rw-r--r--jetty-util/pom.xml8
-rw-r--r--jetty-util/src/main/config/modules/logging.mod11
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/ArrayQueue.java6
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/B64Code.java3
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/BlockingArrayQueue.java246
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/BlockingCallback.java8
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/BufferUtil.java27
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/Fields.java2
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/IteratingCallback.java29
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/IteratingNestedCallback.java68
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/Jetty.java2
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/Loader.java70
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/MultiMap.java6
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/MultiPartInputStreamParser.java15
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/Trie.java2
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/UrlEncoded.java6
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/annotation/ManagedObject.java2
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/annotation/ManagedOperation.java2
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/annotation/Name.java2
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/component/Container.java1
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/log/AbstractLogger.java6
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/log/JavaUtilLog.java6
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/log/Log.java2
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/log/Logger.java9
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/log/LoggerLog.java16
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/log/Slf4jLog.java6
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/log/StdErrLog.java10
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/resource/Resource.java4
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/security/Constraint.java24
-rw-r--r--jetty-util/src/test/java/org/eclipse/jetty/util/BenchmarkHelper.java36
-rw-r--r--jetty-util/src/test/java/org/eclipse/jetty/util/MultiMapTest.java24
-rw-r--r--jetty-util/src/test/java/org/eclipse/jetty/util/MultiPartInputStreamTest.java8
-rw-r--r--jetty-util/src/test/resources/TestData/WindowsDir.zipbin0 -> 2388 bytes
-rw-r--r--jetty-webapp/pom.xml21
-rw-r--r--jetty-webapp/src/main/config/etc/webdefault.xml24
-rw-r--r--jetty-webapp/src/main/config/modules/webapp.mod9
-rw-r--r--jetty-webapp/src/main/java/org/eclipse/jetty/webapp/StandardDescriptorProcessor.java142
-rw-r--r--jetty-webapp/src/main/java/org/eclipse/jetty/webapp/TagLibConfiguration.java8
-rw-r--r--jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java54
-rw-r--r--jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebDescriptor.java30
-rw-r--r--jetty-websocket/README.TXT (renamed from jetty-websocket/README.txt)0
-rw-r--r--jetty-websocket/javax-websocket-client-impl/pom.xml76
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/AbstractJsrRemote.java194
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/BasicEndpointConfig.java63
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/ClientContainer.java342
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/Configurable.java29
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/ConfigurationException.java36
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/DecoderFactory.java178
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/EncoderFactory.java172
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/InitException.java42
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JettyClientContainerProvider.java43
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JsrAsyncRemote.java197
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JsrBasicRemote.java120
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JsrExtension.java92
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JsrExtensionConfig.java35
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JsrHandshakeResponse.java42
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JsrPongMessage.java39
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JsrSession.java375
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JsrSessionFactory.java56
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JsrUpgradeListener.java63
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/MessageHandlerFactory.java86
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/MessageHandlerWrapper.java86
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/MessageType.java31
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/AnnotatedEndpointMetadata.java138
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/AnnotatedEndpointScanner.java205
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/IJsrMethod.java84
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/IJsrParamId.java43
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/JsrCallable.java175
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/JsrEvents.java292
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/JsrParamIdBase.java51
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/JsrParamIdBinary.java72
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/JsrParamIdDecoder.java78
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/JsrParamIdOnClose.java50
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/JsrParamIdOnError.java49
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/JsrParamIdOnMessage.java40
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/JsrParamIdOnOpen.java50
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/JsrParamIdPong.java49
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/JsrParamIdText.java160
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/OnCloseCallable.java90
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/OnErrorCallable.java69
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/OnMessageBinaryCallable.java76
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/OnMessageBinaryStreamCallable.java71
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/OnMessageCallable.java175
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/OnMessagePongCallable.java63
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/OnMessageTextCallable.java75
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/OnMessageTextStreamCallable.java70
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/OnOpenCallable.java70
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/annotations/Param.java135
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/client/AnnotatedClientEndpointConfig.java112
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/client/AnnotatedClientEndpointMetadata.java62
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/client/EmptyClientEndpointConfig.java85
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/client/EmptyConfigurator.java42
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/client/JsrClientEndpointImpl.java72
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/client/SimpleEndpointMetadata.java60
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/decoders/AbstractDecoder.java35
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/decoders/BooleanDecoder.java50
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/decoders/ByteArrayDecoder.java43
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/decoders/ByteBufferDecoder.java41
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/decoders/ByteDecoder.java63
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/decoders/CharacterDecoder.java53
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/decoders/DoubleDecoder.java63
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/decoders/FloatDecoder.java66
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/decoders/InputStreamDecoder.java45
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/decoders/IntegerDecoder.java64
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/decoders/LongDecoder.java61
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/decoders/PongMessageDecoder.java61
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/decoders/PrimitiveDecoderMetadataSet.java70
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/decoders/ReaderDecoder.java45
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/decoders/ShortDecoder.java63
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/decoders/StringDecoder.java44
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/encoders/AbstractEncoder.java35
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/encoders/BooleanEncoder.java39
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/encoders/ByteArrayEncoder.java46
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/encoders/ByteBufferEncoder.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/payload/NoOpValidator.java)23
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/encoders/ByteEncoder.java39
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/encoders/CharacterEncoder.java39
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/encoders/DefaultBinaryEncoder.java33
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/encoders/DefaultBinaryStreamEncoder.java37
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/encoders/DefaultTextEncoder.java31
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/encoders/DefaultTextStreamEncoder.java35
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/encoders/DoubleEncoder.java39
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/encoders/EncodeFailedFuture.java71
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/encoders/FloatEncoder.java38
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/encoders/IntegerEncoder.java39
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/encoders/LongEncoder.java39
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/encoders/PrimitiveEncoderMetadataSet.java62
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/encoders/ShortEncoder.java39
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/encoders/StringEncoder.java35
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/endpoints/AbstractJsrEventDriver.java115
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/endpoints/EndpointInstance.java58
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/endpoints/JsrAnnotatedEventDriver.java363
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/endpoints/JsrEndpointEventDriver.java227
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/endpoints/JsrEndpointImpl.java57
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/endpoints/JsrEventDriverFactory.java52
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/messages/BinaryPartialMessage.java80
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/messages/BinaryPartialOnMessage.java66
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/messages/BinaryWholeMessage.java67
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/messages/SendHandlerWriteCallback.java46
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/messages/TextPartialMessage.java59
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/messages/TextPartialOnMessage.java67
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/messages/TextWholeMessage.java63
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/metadata/CoderMetadata.java70
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/metadata/CoderMetadataSet.java235
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/metadata/DecoderMetadata.java34
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/metadata/DecoderMetadataSet.java92
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/metadata/DuplicateCoderException.java42
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/metadata/EncoderMetadata.java34
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/metadata/EncoderMetadataSet.java92
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/metadata/EndpointMetadata.java28
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/metadata/MessageHandlerMetadata.java71
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/utils/Primitives.java77
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/resources/META-INF/services/javax.websocket.ContainerProvider1
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/AnnotatedEchoClient.java60
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/AnnotatedEchoTest.java89
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/ConfiguratorTest.java134
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/DecoderFactoryTest.java107
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/EchoCaptureHandler.java32
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/EchoHandler.java42
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/EncoderFactoryTest.java86
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/EndpointEchoClient.java66
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/EndpointEchoTest.java140
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/JettyEchoSocket.java50
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/JsrSessionTest.java116
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/MessageHandlerFactoryTest.java76
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/MessageQueue.java56
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/annotations/DateTextSocket.java57
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/annotations/JsrParamIdDecoderTest.java57
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/decoders/BadDualDecoder.java122
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/decoders/DateDecoder.java62
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/decoders/DateTimeDecoder.java62
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/decoders/IntegerDecoderTest.java37
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/decoders/PrimitiveDecoderMetadataSetTest.java53
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/decoders/TimeDecoder.java62
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/decoders/ValidDualDecoder.java65
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/encoders/BadDualEncoder.java54
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/encoders/DateEncoder.java48
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/encoders/DateTimeEncoder.java48
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/encoders/DualEncoder.java58
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/encoders/TimeEncoder.java48
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/encoders/ValidDualEncoder.java64
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/ClientAnnotatedEndpointScanner_GoodSignaturesTest.java162
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/ClientAnnotatedEndpointScanner_InvalidSignaturesTest.java113
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/OnCloseTest.java126
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/TrackingSocket.java125
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/BasicBinaryMessageByteBufferSocket.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/compress/CompressionMethod.java)31
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/BasicErrorSessionSocket.java35
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/BasicErrorSessionThrowableSocket.java36
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/BasicErrorSocket.java34
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/BasicErrorThrowableSessionSocket.java36
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/BasicErrorThrowableSocket.java35
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/BasicOpenCloseSessionSocket.java46
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/BasicOpenCloseSocket.java41
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/BasicOpenSessionSocket.java35
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/BasicOpenSocket.java34
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/BasicPongMessageSocket.java36
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/BasicTextMessageStringSocket.java35
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/InvalidCloseIntSocket.java37
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/InvalidErrorErrorSocket.java37
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/InvalidErrorExceptionSocket.java37
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/InvalidErrorIntSocket.java37
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/InvalidOpenCloseReasonSocket.java38
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/InvalidOpenIntSocket.java37
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/InvalidOpenSessionIntSocket.java38
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/close/CloseEndpointConfigSocket.java36
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/close/CloseReasonSessionSocket.java37
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/close/CloseReasonSocket.java36
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/close/CloseSessionReasonSocket.java37
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/close/CloseSessionSocket.java36
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/samples/close/CloseSocket.java35
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/handlers/BaseMessageHandler.java30
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/handlers/ByteArrayPartialHandler.java30
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/handlers/ByteArrayWholeHandler.java30
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/handlers/ByteBufferPartialHandler.java32
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/handlers/ByteBufferWholeHandler.java32
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/handlers/ComboMessageHandler.java41
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/handlers/ExtendedMessageHandler.java32
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/handlers/InputStreamWholeHandler.java32
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/handlers/LongMessageHandler.java29
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/handlers/ReaderWholeHandler.java32
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/handlers/StringPartialHandler.java30
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/handlers/StringWholeHandler.java30
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/metadata/DecoderMetadataSetTest.java132
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/metadata/EncoderMetadataSetTest.java132
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/samples/AbstractStringEndpoint.java58
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/samples/DummyConnection.java155
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/samples/DummyEndpoint.java32
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/samples/EchoStringEndpoint.java36
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/samples/ExtDecoder.java29
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/samples/Fruit.java25
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/samples/FruitBinaryEncoder.java68
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/samples/FruitDecoder.java82
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/samples/FruitTextEncoder.java42
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/samples/IntSocket.java46
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/utils/ReflectUtilsTest.java138
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/utils/TypeTree.java120
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/test/resources/jetty-logging.properties5
-rw-r--r--jetty-websocket/javax-websocket-server-impl/pom.xml71
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/config/etc/jetty-websockets.xml27
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/config/modules/websocket.mod17
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/AnnotatedServerEndpointConfig.java209
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/AnnotatedServerEndpointMetadata.java108
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/BasicServerEndpointConfig.java122
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/BasicServerEndpointConfigurator.java82
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/JsrCreator.java109
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/JsrHandshakeRequest.java86
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/JsrHandshakeResponse.java42
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/JsrPathParamId.java49
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/JsrServerEndpointImpl.java79
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/JsrServerExtendsEndpointImpl.java71
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/PathParamServerEndpointConfig.java51
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/ServerContainer.java184
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/ServerEndpointMetadata.java30
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/SimpleServerEndpointMetadata.java66
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/WebSocketConfiguration.java103
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/deploy/DiscoveredEndpoints.java158
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/deploy/ServerApplicationConfigListener.java162
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/deploy/ServerEndpointAnnotation.java64
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/deploy/ServerEndpointAnnotationHandler.java88
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/pathmap/WebSocketPathSpec.java347
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer1
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/main/resources/META-INF/services/javax.websocket.server.ServerEndpointConfig$Configurator1
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/examples/GetHttpSessionConfigurator.java34
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/examples/GetHttpSessionSocket.java46
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/examples/MyAuthedConfigurator.java48
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/examples/MyAuthedSocket.java33
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/BasicAnnotatedTest.java81
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/BasicEndpointTest.java89
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/DummyConnection.java160
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/DummyCreator.java39
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/EchoCase.java181
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/EchoClientSocket.java105
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/EchoTest.java294
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/JettyEchoSocket.java87
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/JettyServerEndpointConfiguratorTest.java51
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/LargeAnnotatedTest.java88
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/LargeContainerTest.java88
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/OnMessageReturnTest.java79
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/OnPartialTest.java111
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/ServerAnnotatedEndpointScanner_GoodSignaturesTest.java202
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/ServerAnnotatedEndpointScanner_InvalidSignaturesTest.java111
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/SessionAltConfig.java55
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/SessionInfoEndpoint.java102
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/SessionInfoSocket.java83
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/SessionTest.java171
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/StackUtil.java42
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/TrackingSocket.java125
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/WSServer.java198
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/deploy/DiscoveredEndpointsTest.java57
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/pathmap/PathMappingsTest.java110
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/pathmap/WebSocketPathSpecBadSpecsTest.java87
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/pathmap/WebSocketPathSpecTest.java283
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/BasicBinaryMessageByteBufferSocket.java37
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/BasicCloseReasonSessionSocket.java37
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/BasicCloseReasonSocket.java36
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/BasicCloseSessionReasonSocket.java37
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/BasicCloseSocket.java35
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/BasicErrorSessionSocket.java35
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/BasicErrorSessionThrowableSocket.java36
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/BasicErrorSocket.java34
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/BasicErrorThrowableSessionSocket.java36
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/BasicErrorThrowableSocket.java35
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/BasicOpenCloseSessionSocket.java46
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/BasicOpenCloseSocket.java41
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/BasicOpenSessionSocket.java35
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/BasicOpenSocket.java34
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/BasicPongMessageSocket.java36
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/BasicTextMessageStringSocket.java35
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/InvalidCloseIntSocket.java37
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/InvalidErrorErrorSocket.java37
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/InvalidErrorExceptionSocket.java37
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/InvalidErrorIntSocket.java37
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/InvalidOpenCloseReasonSocket.java38
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/InvalidOpenIntSocket.java37
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/InvalidOpenSessionIntSocket.java38
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/StatelessTextMessageStringSocket.java36
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/beans/DateDecoder.java62
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/beans/DateEncoder.java48
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/beans/DateTextSocket.java69
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/beans/DateTimeDecoder.java62
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/beans/DateTimeEncoder.java48
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/beans/TimeDecoder.java62
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/beans/TimeEncoder.java48
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/echo/BasicEchoEndpoint.java46
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/echo/BasicEchoEndpointConfigContextListener.java55
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/echo/BasicEchoEndpointContextListener.java54
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/echo/BasicEchoSocket.java37
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/echo/BasicEchoSocketConfigContextListener.java56
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/echo/BasicEchoSocketContextListener.java50
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/echo/EchoReturnEndpoint.java64
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/echo/LargeEchoConfiguredSocket.java47
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/echo/LargeEchoContextListener.java42
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/echo/LargeEchoDefaultSocket.java38
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/partial/PartialTextSessionSocket.java55
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/partial/PartialTextSocket.java63
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/partial/PartialTrackingSocket.java36
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/primitives/BooleanObjectTextParamSocket.java67
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/primitives/BooleanObjectTextSocket.java66
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/primitives/BooleanTextParamSocket.java60
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/primitives/BooleanTextSocket.java59
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/primitives/ByteObjectTextSocket.java66
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/primitives/ByteTextSocket.java59
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/primitives/CharTextSocket.java59
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/primitives/CharacterObjectTextSocket.java66
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/primitives/DoubleObjectTextSocket.java66
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/primitives/DoubleTextSocket.java59
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/primitives/FloatObjectTextSocket.java66
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/primitives/FloatTextSocket.java59
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/primitives/IntParamTextSocket.java60
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/primitives/IntTextSocket.java59
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/primitives/IntegerObjectParamTextSocket.java67
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/primitives/IntegerObjectTextSocket.java66
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/primitives/LongObjectTextSocket.java66
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/primitives/LongTextSocket.java59
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/primitives/ShortObjectTextSocket.java66
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/primitives/ShortTextSocket.java59
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/streaming/ReaderParamSocket.java65
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/streaming/ReaderSocket.java51
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/samples/streaming/StringReturnReaderParamSocket.java56
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/resources/basic-echo-endpoint-config-web.xml12
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/resources/empty-web.xml8
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/resources/jetty-logging.properties8
-rw-r--r--jetty-websocket/javax-websocket-server-impl/src/test/resources/large-echo-config-web.xml12
-rw-r--r--jetty-websocket/pom.xml27
-rw-r--r--jetty-websocket/websocket-api/pom.xml2
-rw-r--r--jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/BadPayloadException.java2
-rw-r--r--jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/InvalidWebSocketException.java2
-rw-r--r--jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/RemoteEndpoint.java36
-rw-r--r--jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/Session.java18
-rw-r--r--jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/StatusCode.java6
-rw-r--r--jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/UpgradeRequest.java59
-rw-r--r--jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/UpgradeResponse.java12
-rw-r--r--jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/WebSocketListener.java2
-rw-r--r--jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/WebSocketPolicy.java262
-rw-r--r--jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/annotations/WebSocket.java4
-rw-r--r--jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/extensions/Extension.java20
-rw-r--r--jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/extensions/ExtensionConfig.java10
-rw-r--r--jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/extensions/ExtensionFactory.java5
-rw-r--r--jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/extensions/Frame.java15
-rw-r--r--jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/extensions/IncomingFrames.java5
-rw-r--r--jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/util/QuoteUtil.java27
-rw-r--r--jetty-websocket/websocket-client/pom.xml2
-rw-r--r--jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/ClientUpgradeRequest.java13
-rw-r--r--jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/WebSocketClient.java140
-rw-r--r--jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/io/ConnectPromise.java11
-rw-r--r--jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/io/ConnectionManager.java2
-rw-r--r--jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/io/UpgradeConnection.java27
-rw-r--r--jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/io/UpgradeListener.java32
-rw-r--r--jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/package-info.java6
-rw-r--r--jetty-websocket/websocket-client/src/test/java/examples/SimpleEchoSocket.java2
-rw-r--r--jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/BadNetworkTest.java4
-rw-r--r--jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/ClientConnectTest.java20
-rw-r--r--jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/JettyTrackingSocket.java (renamed from jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/TrackingSocket.java)6
-rw-r--r--jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/ServerWriteThread.java3
-rw-r--r--jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/SlowClientTest.java2
-rw-r--r--jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/SlowServerTest.java4
-rw-r--r--jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/TimeoutTest.java10
-rw-r--r--jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/WebSocketClientBadUriTest.java2
-rw-r--r--jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/WebSocketClientTest.java72
-rw-r--r--jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/blockhead/BlockheadServer.java23
-rw-r--r--jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/blockhead/IncomingFramesCapture.java10
-rw-r--r--jetty-websocket/websocket-client/src/test/resources/jetty-logging.properties11
-rw-r--r--jetty-websocket/websocket-common/pom.xml2
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/BlockingWriteCallback.java37
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/CloseInfo.java23
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/ConnectionState.java3
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/Generator.java305
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/LogicalConnection.java24
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/Parser.java140
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/SessionFactory.java33
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/WebSocketFrame.java474
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/WebSocketRemoteEndpoint.java283
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/WebSocketSession.java76
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/WebSocketSessionFactory.java43
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/AbstractEventDriver.java247
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/EventDriver.java205
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/EventDriverFactory.java365
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/EventDriverImpl.java58
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/JettyAnnotatedEventDriver.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/AnnotatedEventDriver.java)55
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/JettyAnnotatedImpl.java65
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/JettyAnnotatedMetadata.java53
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/JettyAnnotatedScanner.java170
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/JettyListenerEventDriver.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/ListenerEventDriver.java)44
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/JettyListenerImpl.java44
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/annotated/AbstractMethodAnnotationScanner.java195
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/annotated/CallableMethod.java123
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/annotated/EventMethod.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/EventMethod.java)7
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/annotated/EventMethods.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/EventMethods.java)4
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/annotated/InvalidSignatureException.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/InvalidSignatureException.java)8
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/annotated/OptionalSessionCallableMethod.java91
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/AbstractExtension.java22
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/ExtensionStack.java3
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/WebSocketExtensionFactory.java11
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/compress/DeflateCompressionMethod.java260
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/compress/DeflateFrameExtension.java228
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/compress/FrameCompressionExtension.java131
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/compress/MessageCompressionExtension.java148
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/compress/PerMessageDeflateExtension.java253
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/compress/XWebkitDeflateFrameExtension.java38
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/fragment/FragmentExtension.java23
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/identity/IdentityExtension.java9
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/frames/BinaryFrame.java56
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/frames/CloseFrame.java48
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/frames/ContinuationFrame.java54
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/frames/ControlFrame.java137
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/frames/DataFrame.java104
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/frames/PingFrame.java50
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/frames/PongFrame.java50
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/frames/TextFrame.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/payload/CloseReasonValidator.java)40
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/AbstractWebSocketConnection.java130
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/FramePipes.java13
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/IOState.java146
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/WriteBytesProvider.java219
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/WriteCallbackWrapper.java2
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/payload/DeMaskProcessor.java44
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/payload/UTF8Validator.java111
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/message/MessageAppender.java6
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/message/MessageInputStream.java149
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/message/MessageOutputStream.java212
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/message/MessageReader.java69
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/message/MessageWriter.java181
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/message/SimpleBinaryMessage.java8
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/message/SimpleTextMessage.java8
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/message/Utf8CharBuffer.java115
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/util/ReflectUtils.java395
-rw-r--r--jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/util/TextUtil.java84
-rw-r--r--jetty-websocket/websocket-common/src/main/resources/META-INF/services/org.eclipse.jetty.websocket.api.extensions.Extension5
-rw-r--r--jetty-websocket/websocket-common/src/test/java/examples/AnnotatedBinaryStreamSocket.java4
-rw-r--r--jetty-websocket/websocket-common/src/test/java/examples/echo/AnnotatedEchoSocket.java4
-rw-r--r--jetty-websocket/websocket-common/src/test/java/examples/echo/ListenerEchoSocket.java2
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/GeneratorParserRoundtripTest.java22
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/GeneratorTest.java307
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/Hex.java80
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/IncomingFramesCapture.java31
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/OutgoingFramesCapture.java3
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/OutgoingNetworkBytesCapture.java6
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ParserTest.java180
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/PingPayloadParserTest.java6
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/RFC6455ExamplesGeneratorTest.java57
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/RFC6455ExamplesParserTest.java21
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/RawFrameBuilder.java110
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/TextPayloadParserTest.java13
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/UnitGenerator.java66
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/UnitParser.java12
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/WebSocketFrameTest.java103
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/WebSocketRemoteEndpointTest.java86
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase1_1.java89
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase1_2.java40
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase2.java46
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase3.java23
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase4.java8
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase7_3.java39
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/annotations/MyStatelessEchoSocket.java2
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/events/EventCapture.java60
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/events/EventDriverFactoryTest.java314
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/events/EventDriverTest.java58
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/events/JettyAnnotatedScannerTest.java340
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/AllTests.java9
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/DummyIncomingFrames.java3
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/DummyOutgoingFrames.java6
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/FragmentExtensionTest.java36
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/IdentityExtensionTest.java5
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/CapturedHexPayloads.java48
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/DeflateCompressionMethodTest.java221
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/DeflateFrameExtensionTest.java (renamed from jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/FrameCompressionExtensionTest.java)106
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/DeflateTest.java82
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/PerMessageDeflateExtensionTest.java (renamed from jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/MessageCompressionExtensionTest.java)293
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/io/LocalWebSocketConnection.java46
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/io/LocalWebSocketSession.java13
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/io/TrackingCallback.java68
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/io/WriteBytesProviderTest.java190
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/io/http/HttpResponseParseCapture.java9
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/io/payload/DeMaskProcessorTest.java61
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/io/payload/UTF8ValidatorTest.java57
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/message/DummySocket.java29
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/message/MessageDebug.java60
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/message/MessageInputStreamTest.java187
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/message/MessageOutputStreamTest.java133
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/message/MessageWriterTest.java134
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/message/TrackingInputStreamSocket.java110
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/message/TrackingSocket.java169
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/message/Utf8CharBufferTest.java125
-rw-r--r--jetty-websocket/websocket-common/src/test/resources/jetty-logging.properties3
-rw-r--r--jetty-websocket/websocket-mux-extension/pom.xml56
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/AbstractMuxExtension.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/mux/AbstractMuxExtension.java)2
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/MuxChannel.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/mux/MuxChannel.java)28
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/MuxControlBlock.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/mux/MuxControlBlock.java)2
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/MuxException.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/mux/MuxException.java)2
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/MuxGenerator.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/mux/MuxGenerator.java)19
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/MuxOp.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/mux/MuxOp.java)2
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/MuxParser.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/mux/MuxParser.java)22
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/MuxPhysicalConnectionException.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/mux/MuxPhysicalConnectionException.java)4
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/MuxRequest.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/mux/MuxRequest.java)2
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/MuxResponse.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/mux/MuxResponse.java)2
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/MuxedFrame.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/mux/MuxedFrame.java)14
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/Muxer.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/mux/Muxer.java)24
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/add/MuxAddClient.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/mux/add/MuxAddClient.java)4
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/add/MuxAddServer.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/mux/add/MuxAddServer.java)10
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/add/package-info.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/mux/add/package-info.java)2
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/client/MuxClientAddHandler.java (renamed from jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/mux/MuxClientAddHandler.java)6
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/client/MuxClientExtension.java (renamed from jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/mux/MuxClientExtension.java)6
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/client/package-info.java (renamed from jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/mux/package-info.java)2
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/op/MuxAddChannelRequest.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/mux/op/MuxAddChannelRequest.java)6
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/op/MuxAddChannelResponse.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/mux/op/MuxAddChannelResponse.java)6
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/op/MuxDropChannel.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/mux/op/MuxDropChannel.java)6
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/op/MuxFlowControl.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/mux/op/MuxFlowControl.java)6
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/op/MuxNewChannelSlot.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/mux/op/MuxNewChannelSlot.java)6
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/op/package-info.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/mux/op/package-info.java)2
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/package-info.java (renamed from jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/mux/package-info.java)2
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/server/EmptyHttpInput.java (renamed from jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/mux/EmptyHttpInput.java)13
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/server/HttpChannelOverMux.java (renamed from jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/mux/HttpChannelOverMux.java)2
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/server/HttpTransportOverMux.java (renamed from jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/mux/HttpTransportOverMux.java)15
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/server/MuxAddHandler.java (renamed from jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/mux/MuxAddHandler.java)14
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/server/MuxServerExtension.java (renamed from jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/mux/MuxServerExtension.java)6
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/java/org/eclipse/jetty/websocket/mux/server/package-info.java (renamed from jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/mux/package-info.java)2
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/resources/META-INF/services/org.eclipse.jetty.websocket.client.ClientExtension1
-rw-r--r--jetty-websocket/websocket-mux-extension/src/main/resources/META-INF/services/org.eclipse.jetty.websocket.server.ServerExtension1
-rw-r--r--jetty-websocket/websocket-mux-extension/src/test/java/examples/echo/AdapterEchoSocket.java47
-rw-r--r--jetty-websocket/websocket-mux-extension/src/test/java/org/eclipse/jetty/websocket/mux/MuxDecoder.java (renamed from jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/mux/MuxDecoder.java)3
-rw-r--r--jetty-websocket/websocket-mux-extension/src/test/java/org/eclipse/jetty/websocket/mux/MuxEncoder.java (renamed from jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/mux/MuxEncoder.java)4
-rw-r--r--jetty-websocket/websocket-mux-extension/src/test/java/org/eclipse/jetty/websocket/mux/MuxEventCapture.java (renamed from jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/mux/MuxEventCapture.java)20
-rw-r--r--jetty-websocket/websocket-mux-extension/src/test/java/org/eclipse/jetty/websocket/mux/MuxGeneratorWrite139SizeTest.java (renamed from jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/mux/MuxGeneratorWrite139SizeTest.java)4
-rw-r--r--jetty-websocket/websocket-mux-extension/src/test/java/org/eclipse/jetty/websocket/mux/MuxGeneratorWriteChannelIdTest.java (renamed from jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/mux/MuxGeneratorWriteChannelIdTest.java)4
-rw-r--r--jetty-websocket/websocket-mux-extension/src/test/java/org/eclipse/jetty/websocket/mux/MuxParserRFCTest.java (renamed from jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/mux/MuxParserRFCTest.java)14
-rw-r--r--jetty-websocket/websocket-mux-extension/src/test/java/org/eclipse/jetty/websocket/mux/MuxParserRead139Size_BadEncodingTest.java (renamed from jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/mux/MuxParserRead139Size_BadEncodingTest.java)6
-rw-r--r--jetty-websocket/websocket-mux-extension/src/test/java/org/eclipse/jetty/websocket/mux/MuxParserRead139Size_GoodTest.java (renamed from jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/mux/MuxParserRead139Size_GoodTest.java)4
-rw-r--r--jetty-websocket/websocket-mux-extension/src/test/java/org/eclipse/jetty/websocket/mux/MuxParserReadChannelId_BadEncodingTest.java (renamed from jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/mux/MuxParserReadChannelId_BadEncodingTest.java)6
-rw-r--r--jetty-websocket/websocket-mux-extension/src/test/java/org/eclipse/jetty/websocket/mux/MuxParserReadChannelId_GoodTest.java (renamed from jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/mux/MuxParserReadChannelId_GoodTest.java)4
-rw-r--r--jetty-websocket/websocket-mux-extension/src/test/java/org/eclipse/jetty/websocket/mux/add/DummyMuxAddClient.java (renamed from jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/mux/add/DummyMuxAddClient.java)5
-rw-r--r--jetty-websocket/websocket-mux-extension/src/test/java/org/eclipse/jetty/websocket/mux/add/DummyMuxAddServer.java (renamed from jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/mux/add/DummyMuxAddServer.java)11
-rw-r--r--jetty-websocket/websocket-mux-extension/src/test/java/org/eclipse/jetty/websocket/mux/add/MuxerAddClientTest.java (renamed from jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/mux/add/MuxerAddClientTest.java)20
-rw-r--r--jetty-websocket/websocket-mux-extension/src/test/java/org/eclipse/jetty/websocket/mux/add/MuxerAddServerTest.java (renamed from jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/mux/add/MuxerAddServerTest.java)21
-rw-r--r--jetty-websocket/websocket-mux-extension/src/test/java/org/eclipse/jetty/websocket/mux/helper/IncomingFramesCapture.java142
-rw-r--r--jetty-websocket/websocket-mux-extension/src/test/java/org/eclipse/jetty/websocket/mux/helper/LocalWebSocketConnection.java250
-rw-r--r--jetty-websocket/websocket-mux-extension/src/test/java/org/eclipse/jetty/websocket/mux/helper/LocalWebSocketSession.java50
-rw-r--r--jetty-websocket/websocket-mux-extension/src/test/java/org/eclipse/jetty/websocket/mux/helper/OutgoingFramesCapture.java96
-rw-r--r--jetty-websocket/websocket-mux-extension/src/test/java/org/eclipse/jetty/websocket/mux/helper/UnitParser.java78
-rw-r--r--jetty-websocket/websocket-mux-extension/src/test/resources/jetty-logging.properties7
-rw-r--r--jetty-websocket/websocket-server/pom.xml17
-rw-r--r--jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/MappedWebSocketCreator.java33
-rw-r--r--jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketHandshake.java1
-rw-r--r--jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketServerConnection.java1
-rw-r--r--jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketServerFactory.java139
-rw-r--r--jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketUpgradeFilter.java229
-rw-r--r--jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketUpgradeHandlerWrapper.java92
-rw-r--r--jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/pathmap/PathMappings.java189
-rw-r--r--jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/pathmap/PathSpec.java167
-rw-r--r--jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/pathmap/PathSpecGroup.java82
-rw-r--r--jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/pathmap/RegexPathSpec.java166
-rw-r--r--jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/pathmap/ServletPathSpec.java291
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/AnnotatedMaxMessageSizeTest.java15
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ByteBufferAssert.java25
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ChromeTest.java3
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/FirefoxTest.java78
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/FragmentExtensionTest.java3
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/FrameCompressionExtensionTest.java5
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/IdentityExtensionTest.java3
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/IdleTimeoutTest.java26
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/LoadTest.java5
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/RequestHeadersTest.java4
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketCloseTest.java21
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketOverSSLTest.java2
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketServerSessionTest.java11
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketServletRFCTest.java119
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/ABServlet.java3
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/ABSocket.java16
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/AbstractABCase.java135
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/Fuzzer.java25
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/RawFrameBuilder.java110
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase1.java81
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase2.java44
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase3.java48
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase4.java88
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase5.java272
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase6.java91
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase6_BadUTF.java10
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase6_GoodUTF.java11
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7.java83
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7_BadStatusCodes.java6
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7_GoodStatusCodes.java13
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase9.java92
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/blockhead/BlockheadClient.java94
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/blockhead/HttpResponse.java9
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/browser/BrowserDebugTool.java16
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/browser/BrowserSocket.java4
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/examples/MyCustomCreationServlet.java6
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/examples/echo/BigEchoSocket.java6
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/examples/echo/EchoBroadcastSocket.java4
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/examples/echo/EchoCreator.java6
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/examples/echo/EchoFragmentSocket.java12
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/helper/CaptureSocket.java11
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/helper/EchoServlet.java8
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/helper/EchoSocket.java4
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/helper/Hex.java7
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/helper/IncomingFramesCapture.java14
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/helper/OutgoingFramesCapture.java2
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/helper/RFCSocket.java4
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/helper/SafariD00.java5
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/helper/SessionSocket.java15
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/pathmap/PathMappingsBenchmarkTest.java226
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/pathmap/PathMappingsTest.java119
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/pathmap/RegexPathSpecTest.java134
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/pathmap/ServletPathSpecTest.java187
-rw-r--r--jetty-websocket/websocket-server/src/test/resources/jetty-logging.properties1
-rw-r--r--jetty-websocket/websocket-servlet/pom.xml9
-rw-r--r--jetty-websocket/websocket-servlet/src/main/java/org/eclipse/jetty/websocket/servlet/ServletUpgradeRequest.java31
-rw-r--r--jetty-websocket/websocket-servlet/src/main/java/org/eclipse/jetty/websocket/servlet/WebSocketCreator.java9
-rw-r--r--jetty-websocket/websocket-servlet/src/main/java/org/eclipse/jetty/websocket/servlet/WebSocketServlet.java40
-rw-r--r--jetty-websocket/websocket-servlet/src/main/java/org/eclipse/jetty/websocket/servlet/WebSocketServletFactory.java41
-rw-r--r--jetty-websocket/websocket-servlet/src/test/java/examples/MyAdvancedEchoCreator.java6
-rw-r--r--jetty-websocket/websocket-servlet/src/test/java/examples/MyAuthedCreator.java60
-rw-r--r--jetty-websocket/websocket-servlet/src/test/java/examples/MyAuthedServlet.java32
-rw-r--r--jetty-websocket/websocket-servlet/src/test/java/examples/MyBinaryEchoSocket.java2
-rw-r--r--jetty-websocket/websocket-servlet/src/test/java/examples/MyEchoSocket.java2
-rw-r--r--jetty-xml/pom.xml2
-rw-r--r--jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java10
-rw-r--r--pom.xml187
-rw-r--r--tests/pom.xml2
-rw-r--r--tests/test-continuation/pom.xml2
-rw-r--r--tests/test-continuation/src/test/java/org/eclipse/jetty/continuation/ContinuationBase.java1
-rw-r--r--tests/test-loginservice/pom.xml2
-rw-r--r--tests/test-loginservice/src/test/java/org/eclipse/jetty/JdbcLoginServiceTest.java1
-rw-r--r--tests/test-sessions/pom.xml2
-rw-r--r--tests/test-sessions/test-hash-sessions/pom.xml2
-rw-r--r--tests/test-sessions/test-jdbc-sessions/pom.xml2
-rw-r--r--tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/ServerCrossContextSessionTest.java1
-rw-r--r--tests/test-sessions/test-sessions-common/pom.xml2
-rw-r--r--tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractProxySerializationTest.java4
-rw-r--r--tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractSessionRenewTest.java31
-rw-r--r--tests/test-webapps/pom.xml2
-rw-r--r--tests/test-webapps/test-jaas-webapp/pom.xml4
-rw-r--r--tests/test-webapps/test-jaas-webapp/src/main/config/demo-base/etc/login.conf (renamed from tests/test-webapps/test-jaas-webapp/src/main/config/webapps.demo/test-jaas.d/login.conf)2
-rw-r--r--tests/test-webapps/test-jaas-webapp/src/main/config/demo-base/etc/login.properties (renamed from tests/test-webapps/test-jaas-webapp/src/main/config/webapps.demo/test-jaas.d/login.properties)0
-rw-r--r--tests/test-webapps/test-jaas-webapp/src/main/config/demo-base/webapps/test-jaas.xml (renamed from tests/test-webapps/test-jaas-webapp/src/main/config/webapps.demo/test-jaas.xml)0
-rw-r--r--tests/test-webapps/test-jaas-webapp/src/main/webapp/index.html2
-rw-r--r--tests/test-webapps/test-jetty-webapp/pom.xml21
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/assembly/embedded-jetty-web-for-webbundle.xml2
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/assembly/web-bundle.xml2
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/etc/demo-rewrite-rules.xml (renamed from jetty-distribution/src/main/resources/etc/jetty-demo.xml)20
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/etc/override-web.xml (renamed from tests/test-webapps/test-jetty-webapp/src/main/config/webapps.demo/test.d/override-web.xml)0
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/etc/realm.properties (renamed from tests/test-webapps/test-jetty-webapp/src/main/config/etc/realm.properties)0
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/etc/test-realm.xml (renamed from tests/test-webapps/test-jetty-webapp/src/main/config/etc/test-realm.xml)4
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/start.d/http.ini6
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/start.ini38
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/webapps/test.xml (renamed from tests/test-webapps/test-jetty-webapp/src/main/config/webapps.demo/test.xml)13
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/JavaxWebSocketChat.java88
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/RewriteServlet.java12
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/WebSocketChatServlet.java17
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/webapp/WEB-INF/web.xml6
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/webapp/auth.html2
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/webapp/index.html2
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/webapp/javax.websocket/index.html112
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/webapp/rewrite/index.html2
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/TestServer.java2
-rw-r--r--tests/test-webapps/test-jndi-webapp/pom.xml53
-rw-r--r--tests/test-webapps/test-jndi-webapp/src/main/assembly/config.xml4
-rw-r--r--tests/test-webapps/test-jndi-webapp/src/main/webapp/index.html4
-rw-r--r--tests/test-webapps/test-mock-resources/pom.xml22
-rw-r--r--tests/test-webapps/test-mock-resources/src/main/java/com/acme/MockTransport.java55
-rw-r--r--tests/test-webapps/test-mock-resources/src/main/resources/META-INF/javaxmail.providers1
-rw-r--r--tests/test-webapps/test-proxy-webapp/pom.xml10
-rw-r--r--tests/test-webapps/test-servlet-spec/pom.xml2
-rw-r--r--tests/test-webapps/test-servlet-spec/test-container-initializer/pom.xml10
-rw-r--r--tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml8
-rw-r--r--tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/assembly/config.xml4
-rw-r--r--tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/AnnotationTest.java39
-rw-r--r--tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/AsyncListenerServlet.java127
-rw-r--r--tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/TestListener.java53
-rw-r--r--tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/webapp/index.html6
-rw-r--r--tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/webapp/stylesheet.css2
-rw-r--r--tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/webapp/stylesheet.css~7
-rw-r--r--tests/test-webapps/test-servlet-spec/test-web-fragment/pom.xml9
-rw-r--r--tests/test-webapps/test-webapp-rfc2616/pom.xml6
1263 files changed, 55629 insertions, 14822 deletions
diff --git a/README.txt b/README.TXT
index 12c781192c..12c781192c 100644
--- a/README.txt
+++ b/README.TXT
diff --git a/VERSION.txt b/VERSION.txt
index df9a323b12..666447222f 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1,3 +1,81 @@
+jetty-9.1.0.M0 - 13 August 2013
+ + 393473 Add support for JSR-356 (javax.websocket) draft
+ + 396562 Add an implementation of RequestLog that supports Slf4j
+ + 398467 Servlet 3.1 Non Blocking IO
+ + 402984 WebSocket Upgrade must honor case insensitive header fields in
+ upgrade request
+ + 403280 Update to javax.el 2.2.4
+ + 403380 Introduce WebSocketTimeoutException to differentiate between EOF on
+ write and Timeout
+ + 403510 HttpSession maxInactiveInterval is not serialized in HashSession
+ + 403591 do not use the ConcurrentArrayBlockingQueue for thread pool, selector
+ and async request log
+ + 403817 Use of WebSocket Session.close() results in invalid status code
+ + 405188 HTTP 1.0 with GET returns internal IP address.
+ + 405422 Implement servlet3.1 spec sections 4.4.3 and 8.1.4 for new
+ HttpSessionIdListener class
+ + 405432 Check implementation of section 13.4.1 @ServletSecurity for
+ @HttpConstraint and HttpMethodConstraint clarifications
+ + 405435 Implement servlet3.1 section 13.6.3 for 303 redirects for Form auth
+ + 405437 Implement section 13.8.4 Uncovered HTTP methods
+ + 405525 Throw IllegalArgumentException if filter or servlet name is null or
+ empty string in ServletContext.addXXX() methods
+ + 405526 Deployment must fail if more than 1 servlet maps to same url pattern
+ + 405531 Implement Part.getSubmittedFileName()
+ + 405533 Implement special role ** for security constraints
+ + 405535 Implement Request.isUserInRole(role) check security-role-refs
+ defaulting to security-role if no matching ref
+ + 405944 Check annotation and resource injection is supported for
+ AsyncListener
+ + 406759 supressed stacktrace in ReferrerPushStrategyTest
+ + 407708 HttpUpgradeHandler must support injection
+ + 408782 Transparent Proxy - rewrite URL is ignoring query strings.
+ + 408904 Enhance CommandlineBuilder to not escape strings inside single quotes
+ + 409403 fix IllegalStateException when SPDY is used and the response is
+ written through BufferUtil.writeTo byte by byte
+ + 409796 fix and cleanup ReferrerPushStrategy. There's more work to do here,
+ so it remains @Ignore for now
+ + 409953 return buffer.slice() instead of buffer.asReadOnlyBuffer() in
+ ResourceCache to avoid using inefficent path in BufferUtil.writeTo
+ + 410083 Jetty clients submits incomplete URL to proxy.
+ + 410098 inject accept-encoding header for all http requests through SPDY as
+ SPDY clients MUST support spdy. Also remove two new tests that have been to
+ implementation agnostic and not needed anymore due to recent code changes
+ + 410246 HttpClient with proxy does not tunnel HTTPS requests.
+ + 410341 suppress stacktraces that happen during test setup shutdown after
+ successful test run
+ + 410800 Make RewritePatternRule queryString aware
+ + 412418 HttpTransportOverSPDY fix race condition while sending push streams
+ that could cause push data not to be sent. Fixes intermittent test issues in
+ ReferrerPushStrategyTest
+ + 412729 SPDYClient needs a Promise-based connect() method.
+ + 412829 Allow any mappings from web-default.xml to be overridden by web.xml
+ + 412830 Error Page match ServletException then root cause
+ + 412840 remove Future in SPDYClient.connect() and return Session instead in
+ blocking version
+ + 412935 setLocale is not an explicit set of character encoding
+ + 412940 minor threadsafe fixes
+ + 413018 ServletContext.addListener() should throw IllegalArgumentException if
+ arg is not correct type of listener
+ + 413020 Second call to HttpSession.invalidate() should throw exception 413019
+ HttpSession.getCreateTime() should throw exception after session is
+ invalidated
+ + 413291 Avoid SPDY double dispatch
+ + 413531 Introduce pluggable transports for HttpClient.
+ + 413901 isAsyncStarted remains true while original request is dispatched
+ + 414167 WebSocket handshake upgrade from FireFox fails due to keep-alive
+ + 414635 Modular start.d and jetty.base property
+ + 414640 HTTP header value encoding
+ + 414725 Annotation Scanning should exclude webapp basedir from path
+ validation checks
+ + 414731 Request.getCookies() should return null if there are no cookies
+ + 414740 Removed the parent peeking Loader
+ + 414891 Errors thrown by ReadListener and WriteListener not handled
+ correctly.
+ + 414913 WebSocket / Performance - reduce ByteBuffer allocation/copying during
+ generation/writing
+ + 414923 CompactPathRule needs to also compact the uri
+
jetty-9.0.5.v20130815 - 15 August 2013
+ 414898 Only upgrade v0 to v1 cookies on dquote , ; backslash space and tab
in the value
diff --git a/aggregates/jetty-all/pom.xml b/aggregates/jetty-all/pom.xml
index a12034f8db..46b77d0cec 100644
--- a/aggregates/jetty-all/pom.xml
+++ b/aggregates/jetty-all/pom.xml
@@ -2,13 +2,12 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
- <version>9.0.6-SNAPSHOT</version>
+ <version>9.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-all</artifactId>
- <version>9.0.5.v20130815</version>
<name>Jetty :: Aggregate :: All core Jetty</name>
<url>http://www.eclipse.org/jetty</url>
<build>
@@ -26,7 +25,7 @@
<configuration>
<excludes>**/MANIFEST.MF,javax/**</excludes>
<excludeArtifactIds>javax</excludeArtifactIds>
- <excludeGroupIds>javax,org.eclipse.jetty.orbit</excludeGroupIds>
+ <excludeGroupIds>javax,org.eclipse.jetty.orbit,org.mortbay.jetty.npn</excludeGroupIds>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
@@ -42,9 +41,9 @@
<classifier>sources</classifier>
<includes>**/*</includes>
<excludes>META-INF/**,**/Servlet3Continuation*,**/Jetty6Continuation*</excludes>
- <includeGroupIds>org.eclipse.jetty</includeGroupIds>
+ <includeGroupIds>org.eclipse.jetty,org.eclipse.jetty.websocket</includeGroupIds>
<excludeArtifactIds>javax</excludeArtifactIds>
- <excludeGroupIds>javax,org.eclipse.jetty.orbit</excludeGroupIds>
+ <excludeGroupIds>javax,org.eclipse.jetty.orbit,org.mortbay.jetty.npn</excludeGroupIds>
<outputDirectory>${project.build.directory}/sources</outputDirectory>
<overWriteReleases>true</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
@@ -94,91 +93,132 @@
</executions>
</plugin>
</plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
</build>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-client</artifactId>
- <version>9.0.6-SNAPSHOT</version>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-deploy</artifactId>
- <version>9.0.6-SNAPSHOT</version>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
- <artifactId>websocket-server</artifactId>
- <version>9.0.6-SNAPSHOT</version>
+ <artifactId>websocket-servlet</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty.websocket</groupId>
+ <artifactId>javax-websocket-server-impl</artifactId>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-client</artifactId>
- <version>9.0.6-SNAPSHOT</version>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.spdy</groupId>
<artifactId>spdy-http-server</artifactId>
- <version>9.0.6-SNAPSHOT</version>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty.orbit</groupId>
- <artifactId>javax.servlet</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-jmx</artifactId>
- <version>9.0.6-SNAPSHOT</version>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-plus</artifactId>
- <version>9.0.6-SNAPSHOT</version>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-annotations</artifactId>
- <version>9.0.6-SNAPSHOT</version>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
- <version>9.0.6-SNAPSHOT</version>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-jaspi</artifactId>
- <version>9.0.6-SNAPSHOT</version>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-jndi</artifactId>
- <version>9.0.6-SNAPSHOT</version>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-rewrite</artifactId>
- <version>9.0.6-SNAPSHOT</version>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
- <version>9.0.6-SNAPSHOT</version>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
+ <!-- dependencies that jetty-all needs (some optional) -->
+ <dependency>
+ <groupId>javax.websocket</groupId>
+ <artifactId>javax.websocket-api</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>javax.transaction-api</artifactId>
+ <scope>compile</scope>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty.orbit</groupId>
+ <artifactId>javax.mail.glassfish</artifactId>
+ <scope>compile</scope>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <scope>compile</scope>
+ <optional>true</optional>
+ </dependency>
</dependencies>
</project>
diff --git a/aggregates/jetty-websocket-all/pom.xml b/aggregates/jetty-websocket-all/pom.xml
new file mode 100644
index 0000000000..26138eee16
--- /dev/null
+++ b/aggregates/jetty-websocket-all/pom.xml
@@ -0,0 +1,163 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-project</artifactId>
+ <version>9.1.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.eclipse.jetty.aggregate</groupId>
+ <artifactId>jetty-websocket-all</artifactId>
+ <name>Jetty :: Aggregate :: All WebSocket Server + Client Classes</name>
+ <url>http://www.eclipse.org/jetty</url>
+ <build>
+ <sourceDirectory>${project.build.directory}/sources</sourceDirectory>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack-dependencies</id>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <configuration>
+ <excludes>**/MANIFEST.MF</excludes>
+ <excludeGroupIds>org.slf4j,org.eclipse.jetty.orbit,org.mortbay.jetty.npn</excludeGroupIds>
+ <outputDirectory>${project.build.directory}/classes</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ </configuration>
+ </execution>
+ <execution>
+ <id>unpack-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <configuration>
+ <classifier>sources</classifier>
+ <includes>**/*</includes>
+ <excludes>META-INF/**,**/Servlet3Continuation*,**/Jetty6Continuation*</excludes>
+ <includeGroupIds>org.eclipse.jetty,org.eclipse.jetty.websocket</includeGroupIds>
+ <excludeArtifactIds>javax</excludeArtifactIds>
+ <excludeGroupIds>javax,org.eclipse.jetty.orbit,org.mortbay.jetty.npn</excludeGroupIds>
+ <outputDirectory>${project.build.directory}/sources</outputDirectory>
+ <overWriteReleases>true</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins
+ </groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>package</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <archive>
+ <manifest>
+ </manifest>
+ <manifestEntries>
+ <mode>development</mode>
+ <url>http://eclipse.org/jetty</url>
+ <Built-By>${user.name}</Built-By>
+ <package>org.eclipse.jetty</package>
+ <Bundle-License>http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/NOTICE.txt</Bundle-License>
+ <Bundle-Name>Jetty</Bundle-Name>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>javadoc-jar</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.jetty.websocket</groupId>
+ <artifactId>websocket-servlet</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty.websocket</groupId>
+ <artifactId>javax-websocket-server-impl</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty.websocket</groupId>
+ <artifactId>websocket-client</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-plus</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-annotations</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-util</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <!-- dependencies that jetty-all needs (some optional) -->
+ <dependency>
+ <groupId>javax.websocket</groupId>
+ <artifactId>javax.websocket-api</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <scope>runtime</scope>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/examples/async-rest/async-rest-jar/pom.xml b/examples/async-rest/async-rest-jar/pom.xml
index 527b4aa784..aeb3267ce6 100644
--- a/examples/async-rest/async-rest-jar/pom.xml
+++ b/examples/async-rest/async-rest-jar/pom.xml
@@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>example-async-rest</artifactId>
- <version>9.0.6-SNAPSHOT</version>
+ <version>9.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.jetty.example-async-rest</groupId>
@@ -22,8 +22,9 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty.orbit</groupId>
- <artifactId>javax.servlet</artifactId>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>3.1-b08</version>
<scope>provided</scope>
</dependency>
</dependencies>
diff --git a/examples/async-rest/async-rest-jar/src/main/java/org/eclipse/jetty/example/asyncrest/AsyncRestServlet.java b/examples/async-rest/async-rest-jar/src/main/java/org/eclipse/jetty/example/asyncrest/AsyncRestServlet.java
index 98f9974bbd..7269c24777 100644
--- a/examples/async-rest/async-rest-jar/src/main/java/org/eclipse/jetty/example/asyncrest/AsyncRestServlet.java
+++ b/examples/async-rest/async-rest-jar/src/main/java/org/eclipse/jetty/example/asyncrest/AsyncRestServlet.java
@@ -25,7 +25,6 @@ import java.util.Map;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.atomic.AtomicInteger;
-
import javax.servlet.AsyncContext;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
@@ -163,7 +162,7 @@ public class AsyncRestServlet extends AbstractRestServlet
out.close();
}
- private abstract class AsyncRestRequest extends Response.Listener.Empty
+ private abstract class AsyncRestRequest extends Response.Listener.Adapter
{
final Utf8StringBuilder _content = new Utf8StringBuilder();
diff --git a/examples/async-rest/async-rest-webapp/pom.xml b/examples/async-rest/async-rest-webapp/pom.xml
index 805130697d..5f48d5999f 100644
--- a/examples/async-rest/async-rest-webapp/pom.xml
+++ b/examples/async-rest/async-rest-webapp/pom.xml
@@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>example-async-rest</artifactId>
- <version>9.0.6-SNAPSHOT</version>
+ <version>9.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.jetty.example-async-rest</groupId>
@@ -25,8 +25,9 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty.orbit</groupId>
- <artifactId>javax.servlet</artifactId>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>3.1-b08</version>
<scope>provided</scope>
</dependency>
</dependencies>
diff --git a/examples/async-rest/pom.xml b/examples/async-rest/pom.xml
index 735b799eac..a4c16ff91a 100644
--- a/examples/async-rest/pom.xml
+++ b/examples/async-rest/pom.xml
@@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty.examples</groupId>
<artifactId>examples-parent</artifactId>
- <version>9.0.6-SNAPSHOT</version>
+ <version>9.1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/examples/embedded/pom.xml b/examples/embedded/pom.xml
index 42cf44411f..f1f5bee89f 100644
--- a/examples/embedded/pom.xml
+++ b/examples/embedded/pom.xml
@@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty.examples</groupId>
<artifactId>examples-parent</artifactId>
- <version>9.0.6-SNAPSHOT</version>
+ <version>9.1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -68,6 +68,10 @@
<version>${project.version}</version>
</dependency>
<dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>javax.transaction-api</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-proxy</artifactId>
<version>${project.version}</version>
diff --git a/examples/embedded/src/main/java/org/eclipse/jetty/embedded/SecuredHelloHandler.java b/examples/embedded/src/main/java/org/eclipse/jetty/embedded/SecuredHelloHandler.java
index 043a6087b9..aa1a4d6daa 100644
--- a/examples/embedded/src/main/java/org/eclipse/jetty/embedded/SecuredHelloHandler.java
+++ b/examples/embedded/src/main/java/org/eclipse/jetty/embedded/SecuredHelloHandler.java
@@ -54,7 +54,6 @@ public class SecuredHelloHandler
security.setConstraintMappings(Collections.singletonList(mapping));
security.setAuthenticator(new BasicAuthenticator());
security.setLoginService(loginService);
- security.setStrict(false);
HelloHandler hh = new HelloHandler();
diff --git a/examples/pom.xml b/examples/pom.xml
index a7ef50aa49..4e4535c5c2 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
- <version>9.0.6-SNAPSHOT</version>
+ <version>9.1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.eclipse.jetty.examples</groupId>
diff --git a/jetty-annotations/pom.xml b/jetty-annotations/pom.xml
index 4e60b134df..43cc4584bf 100644
--- a/jetty-annotations/pom.xml
+++ b/jetty-annotations/pom.xml
@@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
- <version>9.0.6-SNAPSHOT</version>
+ <version>9.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-annotations</artifactId>
@@ -43,7 +43,7 @@
</goals>
<configuration>
<instructions>
- <Import-Package>javax.servlet.*;version="2.6.0",*</Import-Package>
+ <Import-Package>javax.servlet.*;version="[2.6.0,3.2)",*</Import-Package>
</instructions>
</configuration>
</execution>
@@ -98,8 +98,8 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty.orbit</groupId>
- <artifactId>javax.annotation</artifactId>
+ <groupId>javax.annotation</groupId>
+ <artifactId>javax.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.orbit</groupId>
diff --git a/jetty-annotations/src/main/config/modules/annotations.mod b/jetty-annotations/src/main/config/modules/annotations.mod
new file mode 100644
index 0000000000..65e4654127
--- /dev/null
+++ b/jetty-annotations/src/main/config/modules/annotations.mod
@@ -0,0 +1,17 @@
+#
+# Jetty Annotation Scanning Module
+#
+
+[depend]
+# Annotations needs plus, and jndi features
+plus
+
+[lib]
+# Annotations needs jetty annotation jars
+lib/jetty-annotations-${jetty.version}.jar
+# Need annotation processing jars too
+lib/annotations/*.jar
+
+[xml]
+# Enable annotation scanning webapp configurations
+etc/jetty-annotations.xml
diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java
index eaa7c009cb..c26901f73e 100644
--- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java
+++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java
@@ -141,6 +141,11 @@ public class AnnotationConfiguration extends AbstractConfiguration
}
+ public void addDiscoverableAnnotationHandler(DiscoverableAnnotationHandler handler)
+ {
+ _discoverableAnnotationHandlers.add(handler);
+ }
+
@Override
public void deconfigure(WebAppContext context) throws Exception
{
@@ -211,7 +216,7 @@ public class AnnotationConfiguration extends AbstractConfiguration
@Override
public void postConfigure(WebAppContext context) throws Exception
{
- MultiMap map = (MultiMap)context.getAttribute(CLASS_INHERITANCE_MAP);
+ MultiMap<String> map = (MultiMap<String>)context.getAttribute(CLASS_INHERITANCE_MAP);
if (map != null)
map.clear();
@@ -287,7 +292,7 @@ public class AnnotationConfiguration extends AbstractConfiguration
//process the whole class hierarchy to satisfy the ServletContainerInitializer
if (context.getAttribute(CLASS_INHERITANCE_MAP) == null)
{
- MultiMap map = new MultiMap();
+ MultiMap<String> map = new MultiMap<>();
context.setAttribute(CLASS_INHERITANCE_MAP, map);
_classInheritanceHandler = new ClassInheritanceHandler(map);
}
@@ -328,9 +333,9 @@ public class AnnotationConfiguration extends AbstractConfiguration
/**
* Check to see if the ServletContainerIntializer loaded via the ServiceLoader came
* from a jar that is excluded by the fragment ordering. See ServletSpec 3.0 p.85.
- * @param orderedJars
+ * @param context
* @param service
- * @return
+ * @return true if excluded
*/
public boolean isFromExcludedJar (WebAppContext context, ServletContainerInitializer service)
throws Exception
@@ -369,7 +374,7 @@ public class AnnotationConfiguration extends AbstractConfiguration
/**
* @param context
- * @return
+ * @return list of non-excluded {@link ServletContainerInitializer}s
* @throws Exception
*/
public List<ServletContainerInitializer> getNonExcludedInitializers (WebAppContext context)
@@ -525,7 +530,7 @@ public class AnnotationConfiguration extends AbstractConfiguration
*
* @param jar
* @param frags
- * @return
+ * @return the fragment if found, or null of not found
* @throws Exception
*/
public FragmentDescriptor getFragmentFromJar (Resource jar, List<FragmentDescriptor> frags)
diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationDecorator.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationDecorator.java
index d0fd9546b0..b50fb45dd3 100644
--- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationDecorator.java
+++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationDecorator.java
@@ -18,19 +18,11 @@
package org.eclipse.jetty.annotations;
-import java.util.EventListener;
-
-import javax.servlet.Filter;
-import javax.servlet.Servlet;
-import javax.servlet.ServletException;
-
-import org.eclipse.jetty.servlet.FilterHolder;
import org.eclipse.jetty.servlet.ServletContextHandler.Decorator;
-import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.webapp.WebAppContext;
/**
- * WebAppDecoratorWrapper
+ * AnnotationDecorator
*
*
*/
@@ -53,99 +45,6 @@ public class AnnotationDecorator implements Decorator
_introspector.registerHandler(new ServletSecurityAnnotationHandler(context));
}
- /* ------------------------------------------------------------ */
- /**
- * @param filter
- * @throws ServletException
- * @see org.eclipse.jetty.servlet.ServletContextHandler.Decorator#decorateFilterHolder(org.eclipse.jetty.servlet.FilterHolder)
- */
- public void decorateFilterHolder(FilterHolder filter) throws ServletException
- {
- }
-
- /* ------------------------------------------------------------ */
- /**
- * @param <T>
- * @param filter
- * @return the decorated filter
- * @throws ServletException
- * @see org.eclipse.jetty.servlet.ServletContextHandler.Decorator#decorateFilterInstance(javax.servlet.Filter)
- */
- public <T extends Filter> T decorateFilterInstance(T filter) throws ServletException
- {
- introspect(filter);
- return filter;
- }
-
- /* ------------------------------------------------------------ */
- /**
- * @param <T>
- * @param listener
- * @return the decorated event listener instance
- * @throws ServletException
- * @see org.eclipse.jetty.servlet.ServletContextHandler.Decorator#decorateListenerInstance(java.util.EventListener)
- */
- public <T extends EventListener> T decorateListenerInstance(T listener) throws ServletException
- {
- introspect(listener);
- return listener;
- }
-
- /* ------------------------------------------------------------ */
- /**
- * @param servlet
- * @throws ServletException
- * @see org.eclipse.jetty.servlet.ServletContextHandler.Decorator#decorateServletHolder(org.eclipse.jetty.servlet.ServletHolder)
- */
- public void decorateServletHolder(ServletHolder servlet) throws ServletException
- {
- }
-
- /* ------------------------------------------------------------ */
- /**
- * @param <T>
- * @param servlet
- * @return the decorated servlet instance
- * @throws ServletException
- * @see org.eclipse.jetty.servlet.ServletContextHandler.Decorator#decorateServletInstance(javax.servlet.Servlet)
- */
- public <T extends Servlet> T decorateServletInstance(T servlet) throws ServletException
- {
- introspect(servlet);
- return servlet;
- }
-
- /* ------------------------------------------------------------ */
- /**
- * @param f
- * @see org.eclipse.jetty.servlet.ServletContextHandler.Decorator#destroyFilterInstance(javax.servlet.Filter)
- */
- public void destroyFilterInstance(Filter f)
- {
- }
-
- /* ------------------------------------------------------------ */
- /**
- * @param s
- * @see org.eclipse.jetty.servlet.ServletContextHandler.Decorator#destroyServletInstance(javax.servlet.Servlet)
- */
- public void destroyServletInstance(Servlet s)
- {
- }
-
-
-
-
-
- /* ------------------------------------------------------------ */
- /**
- * @param f
- * @see org.eclipse.jetty.servlet.ServletContextHandler.Decorator#destroyListenerInstance(java.util.EventListener)
- */
- public void destroyListenerInstance(EventListener f)
- {
- }
-
/**
* Look for annotations that can be discovered with introspection:
* <ul>
@@ -161,4 +60,17 @@ public class AnnotationDecorator implements Decorator
{
_introspector.introspect(o.getClass());
}
+
+ @Override
+ public Object decorate(Object o)
+ {
+ introspect(o);
+ return o;
+ }
+
+ @Override
+ public void destroy(Object o)
+ {
+
+ }
}
diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java
index 4607f139fc..057d0ea22a 100644
--- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java
+++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java
@@ -237,8 +237,6 @@ public class AnnotationParser
/**
* Get the name of the annotation processed by this handler. Can be null
- *
- * @return
*/
public String getAnnotationName();
}
@@ -513,7 +511,7 @@ public class AnnotationParser
* Register a handler that will be called back when the named annotation is
* encountered on a class.
*
- * @deprecated see registerHandler(Handler)
+ * @deprecated see {@link #registerHandler(Handler)}
* @param annotationName
* @param handler
*/
@@ -525,9 +523,8 @@ public class AnnotationParser
/**
- * @deprecated
+ * @deprecated no replacement provided
* @param annotationName
- * @return
*/
@Deprecated
public List<DiscoverableAnnotationHandler> getAnnotationHandlers(String annotationName)
@@ -547,8 +544,7 @@ public class AnnotationParser
}
/**
- * @deprecated
- * @return
+ * @deprecated no replacement available
*/
@Deprecated
public List<DiscoverableAnnotationHandler> getAnnotationHandlers()
@@ -563,7 +559,7 @@ public class AnnotationParser
}
/**
- * @deprecated see registerHandler(Handler)
+ * @deprecated see {@link #registerHandler(Handler)}
* @param handler
*/
@Deprecated
@@ -605,7 +601,6 @@ public class AnnotationParser
* Remove a particular handler
*
* @param h
- * @return
*/
public boolean deregisterHandler(Handler h)
{
@@ -625,7 +620,6 @@ public class AnnotationParser
/**
* True if the class has already been processed, false otherwise
* @param className
- * @return
*/
public boolean isParsed (String className)
{
@@ -652,7 +646,7 @@ public class AnnotationParser
if (!isParsed(className) || resolver.shouldOverride(className))
{
className = className.replace('.', '/')+".class";
- URL resource = Loader.getResource(this.getClass(), className, false);
+ URL resource = Loader.getResource(this.getClass(), className);
if (resource!= null)
{
Resource r = Resource.newResource(resource);
@@ -683,7 +677,7 @@ public class AnnotationParser
if (!isParsed(cz.getName()) || resolver.shouldOverride(cz.getName()))
{
String nameAsResource = cz.getName().replace('.', '/')+".class";
- URL resource = Loader.getResource(this.getClass(), nameAsResource, false);
+ URL resource = Loader.getResource(this.getClass(), nameAsResource);
if (resource!= null)
{
Resource r = Resource.newResource(resource);
@@ -732,7 +726,7 @@ public class AnnotationParser
if ((resolver == null) || (!resolver.isExcluded(s) && (!isParsed(s) || resolver.shouldOverride(s))))
{
s = s.replace('.', '/')+".class";
- URL resource = Loader.getResource(this.getClass(), s, false);
+ URL resource = Loader.getResource(this.getClass(), s);
if (resource!= null)
{
Resource r = Resource.newResource(resource);
diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/ClassInheritanceHandler.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/ClassInheritanceHandler.java
index ca6c61be12..50892a851a 100644
--- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/ClassInheritanceHandler.java
+++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/ClassInheritanceHandler.java
@@ -33,16 +33,15 @@ import org.eclipse.jetty.util.log.Logger;
public class ClassInheritanceHandler implements ClassHandler
{
private static final Logger LOG = Log.getLogger(ClassInheritanceHandler.class);
-
- MultiMap _inheritanceMap;
+ MultiMap<String> _inheritanceMap;
public ClassInheritanceHandler()
{
- _inheritanceMap = new MultiMap();
+ _inheritanceMap = new MultiMap<>();
}
- public ClassInheritanceHandler(MultiMap map)
+ public ClassInheritanceHandler(MultiMap<String> map)
{
_inheritanceMap = map;
}
@@ -65,12 +64,12 @@ public class ClassInheritanceHandler implements ClassHandler
}
}
- public List getClassNamesExtendingOrImplementing (String className)
+ public List<String> getClassNamesExtendingOrImplementing (String className)
{
return _inheritanceMap.getValues(className);
}
- public MultiMap getMap ()
+ public MultiMap<String> getMap ()
{
return _inheritanceMap;
}
diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/PostConstructAnnotationHandler.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/PostConstructAnnotationHandler.java
index 2b962a5baf..5d5daea089 100644
--- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/PostConstructAnnotationHandler.java
+++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/PostConstructAnnotationHandler.java
@@ -44,7 +44,7 @@ public class PostConstructAnnotationHandler extends AbstractIntrospectableAnnota
public void doHandle(Class clazz)
{
//Check that the PostConstruct is on a class that we're interested in
- if (Util.isServletType(clazz))
+ if (Util.supportsPostConstructPreDestroy(clazz))
{
Method[] methods = clazz.getDeclaredMethods();
for (int i=0; i<methods.length; i++)
diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/PreDestroyAnnotationHandler.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/PreDestroyAnnotationHandler.java
index 545054255f..a536885ebd 100644
--- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/PreDestroyAnnotationHandler.java
+++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/PreDestroyAnnotationHandler.java
@@ -43,7 +43,7 @@ public class PreDestroyAnnotationHandler extends AbstractIntrospectableAnnotatio
public void doHandle(Class clazz)
{
//Check that the PreDestroy is on a class that we're interested in
- if (Util.isServletType(clazz))
+ if (Util.supportsPostConstructPreDestroy(clazz))
{
Method[] methods = clazz.getDeclaredMethods();
for (int i=0; i<methods.length; i++)
diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/ResourceAnnotationHandler.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/ResourceAnnotationHandler.java
index 875de2db2f..ce8d9a7190 100644
--- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/ResourceAnnotationHandler.java
+++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/ResourceAnnotationHandler.java
@@ -57,7 +57,7 @@ public class ResourceAnnotationHandler extends AbstractIntrospectableAnnotationH
*/
public void doHandle(Class<?> clazz)
{
- if (Util.isServletType(clazz))
+ if (Util.supportsResourceInjection(clazz))
{
handleClass(clazz);
diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/ServletSecurityAnnotationHandler.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/ServletSecurityAnnotationHandler.java
index 41c654c1e7..00ac4b0f23 100644
--- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/ServletSecurityAnnotationHandler.java
+++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/ServletSecurityAnnotationHandler.java
@@ -112,6 +112,9 @@ public class ServletSecurityAnnotationHandler extends AbstractIntrospectableAnno
for (ConstraintMapping m:constraintMappings)
securityHandler.addConstraintMapping(m);
+
+ //Servlet Spec 3.1 requires paths with uncovered http methods to be reported
+ securityHandler.checkPathsWithUncoveredHttpMethods();
}
@@ -123,17 +126,10 @@ public class ServletSecurityAnnotationHandler extends AbstractIntrospectableAnno
* @param rolesAllowed
* @param permitOrDeny
* @param transport
- * @return
*/
protected Constraint makeConstraint (Class servlet, String[] rolesAllowed, EmptyRoleSemantic permitOrDeny, TransportGuarantee transport)
{
return ConstraintSecurityHandler.createConstraint(servlet.getName(), rolesAllowed, permitOrDeny, transport);
-
-
-
-
-
-
}
@@ -141,7 +137,6 @@ public class ServletSecurityAnnotationHandler extends AbstractIntrospectableAnno
/**
* Get the ServletMappings for the servlet's class.
* @param className
- * @return
*/
protected List<ServletMapping> getServletMappings(String className)
{
@@ -163,7 +158,6 @@ public class ServletSecurityAnnotationHandler extends AbstractIntrospectableAnno
* Check if there are already <security-constraint> elements defined that match the url-patterns for
* the servlet.
* @param servletMappings
- * @return
*/
protected boolean constraintsExist (List<ServletMapping> servletMappings, List<ConstraintMapping> constraintMappings)
{
diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/Util.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/Util.java
index 37a22a3081..08527c3550 100644
--- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/Util.java
+++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/Util.java
@@ -68,6 +68,42 @@ public class Util
return isServlet;
}
+
+
+ public static boolean supportsResourceInjection (Class c)
+ {
+ if (javax.servlet.Servlet.class.isAssignableFrom(c) ||
+ javax.servlet.Filter.class.isAssignableFrom(c) ||
+ javax.servlet.ServletContextListener.class.isAssignableFrom(c) ||
+ javax.servlet.ServletContextAttributeListener.class.isAssignableFrom(c) ||
+ javax.servlet.ServletRequestListener.class.isAssignableFrom(c) ||
+ javax.servlet.ServletRequestAttributeListener.class.isAssignableFrom(c) ||
+ javax.servlet.http.HttpSessionListener.class.isAssignableFrom(c) ||
+ javax.servlet.http.HttpSessionAttributeListener.class.isAssignableFrom(c) ||
+ javax.servlet.AsyncListener.class.isAssignableFrom(c) ||
+ javax.servlet.http.HttpUpgradeHandler.class.isAssignableFrom(c))
+ return true;
+
+ return false;
+ }
+
+
+ public static boolean supportsPostConstructPreDestroy (Class c)
+ {
+ if (javax.servlet.Servlet.class.isAssignableFrom(c) ||
+ javax.servlet.Filter.class.isAssignableFrom(c) ||
+ javax.servlet.ServletContextListener.class.isAssignableFrom(c) ||
+ javax.servlet.ServletContextAttributeListener.class.isAssignableFrom(c) ||
+ javax.servlet.ServletRequestListener.class.isAssignableFrom(c) ||
+ javax.servlet.ServletRequestAttributeListener.class.isAssignableFrom(c) ||
+ javax.servlet.http.HttpSessionListener.class.isAssignableFrom(c) ||
+ javax.servlet.http.HttpSessionAttributeListener.class.isAssignableFrom(c) ||
+ javax.servlet.AsyncListener.class.isAssignableFrom(c) ||
+ javax.servlet.http.HttpUpgradeHandler.class.isAssignableFrom(c))
+ return true;
+
+ return false;
+ }
public static boolean isEnvEntryType (Class type)
{
diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/WebFilterAnnotation.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/WebFilterAnnotation.java
index 578af77dd3..6d11ee3947 100644
--- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/WebFilterAnnotation.java
+++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/WebFilterAnnotation.java
@@ -61,7 +61,7 @@ public class WebFilterAnnotation extends DiscoveredAnnotation
}
/**
- * @see org.eclipse.jetty.annotations.ClassAnnotation#apply()
+ * @see DiscoveredAnnotation#apply()
*/
public void apply()
{
diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/WebListenerAnnotation.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/WebListenerAnnotation.java
index b82fd1104a..ad3e02ccbd 100644
--- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/WebListenerAnnotation.java
+++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/WebListenerAnnotation.java
@@ -23,6 +23,7 @@ import javax.servlet.ServletContextListener;
import javax.servlet.ServletRequestAttributeListener;
import javax.servlet.ServletRequestListener;
import javax.servlet.http.HttpSessionAttributeListener;
+import javax.servlet.http.HttpSessionIdListener;
import javax.servlet.http.HttpSessionListener;
import org.eclipse.jetty.util.log.Log;
@@ -57,7 +58,7 @@ public class WebListenerAnnotation extends DiscoveredAnnotation
}
/**
- * @see org.eclipse.jetty.annotations.ClassAnnotation#apply()
+ * @see DiscoveredAnnotation#apply()
*/
public void apply()
{
@@ -78,7 +79,8 @@ public class WebListenerAnnotation extends DiscoveredAnnotation
ServletRequestListener.class.isAssignableFrom(clazz) ||
ServletRequestAttributeListener.class.isAssignableFrom(clazz) ||
HttpSessionListener.class.isAssignableFrom(clazz) ||
- HttpSessionAttributeListener.class.isAssignableFrom(clazz))
+ HttpSessionAttributeListener.class.isAssignableFrom(clazz) ||
+ HttpSessionIdListener.class.isAssignableFrom(clazz))
{
java.util.EventListener listener = (java.util.EventListener)clazz.newInstance();
MetaData metaData = _context.getMetaData();
diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/WebServletAnnotation.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/WebServletAnnotation.java
index f76eadf22a..0ba7ca83e3 100644
--- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/WebServletAnnotation.java
+++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/WebServletAnnotation.java
@@ -57,7 +57,7 @@ public class WebServletAnnotation extends DiscoveredAnnotation
}
/**
- * @see org.eclipse.jetty.annotations.ClassAnnotation#apply()
+ * @see DiscoveredAnnotation#apply()
*/
public void apply()
{
diff --git a/jetty-annotations/src/test/java/org/eclipse/jetty/annotations/TestAnnotationParser.java b/jetty-annotations/src/test/java/org/eclipse/jetty/annotations/TestAnnotationParser.java
index 5fb97a30de..6e56a0def1 100644
--- a/jetty-annotations/src/test/java/org/eclipse/jetty/annotations/TestAnnotationParser.java
+++ b/jetty-annotations/src/test/java/org/eclipse/jetty/annotations/TestAnnotationParser.java
@@ -40,6 +40,7 @@ import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
import org.eclipse.jetty.toolchain.test.TestingDir;
import org.junit.Assert;
import org.junit.Rule;
+import org.junit.Rule;
import org.junit.Test;
public class TestAnnotationParser
@@ -132,7 +133,7 @@ public class TestAnnotationParser
parser.registerHandler(new SampleAnnotationHandler());
- long start = System.currentTimeMillis();
+ //long start = System.currentTimeMillis();
parser.parse(classNames,new ClassNameResolver()
{
public boolean isExcluded(String name)
@@ -146,7 +147,7 @@ public class TestAnnotationParser
}
});
- long end = System.currentTimeMillis();
+ //long end = System.currentTimeMillis();
//System.err.println("Time to parse class: " + ((end - start)));
}
diff --git a/jetty-annotations/src/test/java/org/eclipse/jetty/annotations/TestSecurityAnnotationConversions.java b/jetty-annotations/src/test/java/org/eclipse/jetty/annotations/TestSecurityAnnotationConversions.java
index 4ef220f740..d0c07aa727 100644
--- a/jetty-annotations/src/test/java/org/eclipse/jetty/annotations/TestSecurityAnnotationConversions.java
+++ b/jetty-annotations/src/test/java/org/eclipse/jetty/annotations/TestSecurityAnnotationConversions.java
@@ -115,21 +115,12 @@ public class TestSecurityAnnotationConversions
introspector.registerHandler(annotationHandler);
- //set up the expected outcomes:
+ //set up the expected outcomes - no constraints at all as per Servlet Spec 3.1 pg 129
//1 ConstraintMapping per ServletMapping pathSpec
- Constraint expectedConstraint = new Constraint();
- expectedConstraint.setAuthenticate(false);
- expectedConstraint.setDataConstraint(Constraint.DC_NONE);
-
- ConstraintMapping[] expectedMappings = new ConstraintMapping[2];
- expectedMappings[0] = new ConstraintMapping();
- expectedMappings[0].setConstraint(expectedConstraint);
- expectedMappings[0].setPathSpec("/foo/*");
-
- expectedMappings[1] = new ConstraintMapping();
- expectedMappings[1].setConstraint(expectedConstraint);
- expectedMappings[1].setPathSpec("*.foo");
+
+ ConstraintMapping[] expectedMappings = new ConstraintMapping[]{};
+
introspector.introspect(PermitServlet.class);
compareResults (expectedMappings, ((ConstraintAware)wac.getSecurityHandler()).getConstraintMappings());
diff --git a/jetty-ant/pom.xml b/jetty-ant/pom.xml
index e72fa624e8..9f10f176a5 100755
--- a/jetty-ant/pom.xml
+++ b/jetty-ant/pom.xml
@@ -2,7 +2,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-project</artifactId>
- <version>9.0.6-SNAPSHOT</version>
+ <version>9.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-ant</artifactId>
diff --git a/jetty-ant/src/main/java/org/eclipse/jetty/ant/AntWebAppContext.java b/jetty-ant/src/main/java/org/eclipse/jetty/ant/AntWebAppContext.java
index e00479020f..01e2f9cbc9 100644
--- a/jetty-ant/src/main/java/org/eclipse/jetty/ant/AntWebAppContext.java
+++ b/jetty-ant/src/main/java/org/eclipse/jetty/ant/AntWebAppContext.java
@@ -432,9 +432,9 @@ public class AntWebAppContext extends WebAppContext
/**
- * Default constructor. Takes application name as an argument
+ * Default constructor. Takes project as an argument
*
- * @param name web application name.
+ * @param project the project.
*/
public AntWebAppContext(Project project) throws Exception
{
@@ -669,9 +669,6 @@ public class AntWebAppContext extends WebAppContext
}
}
- /**
- * @see WebApplicationProxy#stop()
- */
public void doStop()
{
try
diff --git a/jetty-ant/src/main/java/org/eclipse/jetty/ant/JettyRunTask.java b/jetty-ant/src/main/java/org/eclipse/jetty/ant/JettyRunTask.java
index e6267d65c4..626ea4dfed 100644
--- a/jetty-ant/src/main/java/org/eclipse/jetty/ant/JettyRunTask.java
+++ b/jetty-ant/src/main/java/org/eclipse/jetty/ant/JettyRunTask.java
@@ -136,9 +136,6 @@ public class JettyRunTask extends Task
this.contextHandlers = handlers;
}
- /**
- * @return
- */
public File getTempDirectory()
{
return tempDirectory;
@@ -152,9 +149,6 @@ public class JettyRunTask extends Task
this.tempDirectory = tempDirectory;
}
- /**
- * @return
- */
public File getJettyXml()
{
return jettyXml;
@@ -191,9 +185,6 @@ public class JettyRunTask extends Task
}
}
- /**
- * @return
- */
public String getRequestLog()
{
if (requestLog != null)
@@ -301,9 +292,6 @@ public class JettyRunTask extends Task
TaskLog.log("Daemon="+daemon);
}
- /**
- * @return
- */
public int getScanIntervalSeconds()
{
return scanIntervalSeconds;
diff --git a/jetty-ant/src/main/java/org/eclipse/jetty/ant/utils/ServerProxy.java b/jetty-ant/src/main/java/org/eclipse/jetty/ant/utils/ServerProxy.java
index c4b906e433..432778e714 100644
--- a/jetty-ant/src/main/java/org/eclipse/jetty/ant/utils/ServerProxy.java
+++ b/jetty-ant/src/main/java/org/eclipse/jetty/ant/utils/ServerProxy.java
@@ -27,8 +27,7 @@ public interface ServerProxy
/**
* Adds a new web application to this server.
*
- * @param webApp a WebApplicationProxy object.
- * @param scanIntervalSeconds
+ * @param awc a AntWebAppContext object.
*/
public void addWebApplication(AntWebAppContext awc);
diff --git a/jetty-client/pom.xml b/jetty-client/pom.xml
index 5b5c3491b4..1f7663d82a 100644
--- a/jetty-client/pom.xml
+++ b/jetty-client/pom.xml
@@ -1,138 +1,142 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-project</artifactId>
- <version>9.0.6-SNAPSHOT</version>
- </parent>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-project</artifactId>
+ <version>9.1.0-SNAPSHOT</version>
+ </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jetty-client</artifactId>
- <name>Jetty :: Asynchronous HTTP Client</name>
- <url>http://www.eclipse.org/jetty</url>
- <properties>
- <bundle-symbolic-name>${project.groupId}.client</bundle-symbolic-name>
- <jetty.test.policy.loc>target/test-policy</jetty.test.policy.loc>
- </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <executions>
- <execution>
- <goals>
- <goal>manifest</goal>
- </goals>
- <configuration>
- <instructions>
- <Import-Package>javax.net.*,*</Import-Package>
- </instructions>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <!--
- Required for OSGI
- -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>findbugs-maven-plugin</artifactId>
- <configuration>
- <onlyAnalyze>org.eclipse.jetty.client.*</onlyAnalyze>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>unpack</id>
- <phase>generate-test-resources</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.eclipse.jetty.toolchain</groupId>
- <artifactId>jetty-test-policy</artifactId>
- <version>${jetty-test-policy-version}</version>
- <type>jar</type>
- <overWrite>true</overWrite>
- <includes>**/*.keystore,**/*.pem</includes>
- <outputDirectory>${jetty.test.policy.loc}</outputDirectory>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jetty-client</artifactId>
+ <name>Jetty :: Asynchronous HTTP Client</name>
+ <url>http://www.eclipse.org/jetty</url>
+ <properties>
+ <bundle-symbolic-name>${project.groupId}.client</bundle-symbolic-name>
+ <jetty.test.policy.loc>target/test-policy</jetty.test.policy.loc>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptorRefs>
+ <descriptorRef>config</descriptorRef>
+ </descriptorRefs>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <executions>
+ <execution>
+ <goals>
+ <goal>manifest</goal>
+ </goals>
+ <configuration>
+ <instructions>
+ <Import-Package>javax.net.*,*</Import-Package>
+ </instructions>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- Required for OSGI -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <configuration>
+ <onlyAnalyze>org.eclipse.jetty.client.*</onlyAnalyze>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack</id>
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.eclipse.jetty.toolchain</groupId>
+ <artifactId>jetty-test-policy</artifactId>
+ <version>${jetty-test-policy-version}</version>
+ <type>jar</type>
+ <overWrite>true</overWrite>
+ <includes>**/*.keystore,**/*.pem</includes>
+ <outputDirectory>${jetty.test.policy.loc}</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
- <dependencies>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-http</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-io</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-server</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-security</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-servlet</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <!--
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-websocket</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>-->
- <dependency>
- <groupId>org.eclipse.jetty.toolchain</groupId>
- <artifactId>jetty-test-helper</artifactId>
- <scope>test</scope>
- </dependency>
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-http</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-io</artifactId>
+ <version>${project.version}</version>
+ </dependency>
- <dependency>
- <groupId>com.ning</groupId>
- <artifactId>async-http-client</artifactId>
- <version>1.7.5</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- <version>4.2.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-security</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty.toolchain</groupId>
+ <artifactId>jetty-test-helper</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.ning</groupId>
+ <artifactId>async-http-client</artifactId>
+ <version>1.7.5</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <version>4.2.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
</project>
diff --git a/jetty-client/src/main/config/modules/client.mod b/jetty-client/src/main/config/modules/client.mod
new file mode 100644
index 0000000000..6788eacf79
--- /dev/null
+++ b/jetty-client/src/main/config/modules/client.mod
@@ -0,0 +1,7 @@
+#
+# Client Feature
+#
+
+[lib]
+# Client jars
+lib/jetty-client-${jetty.version}.jar
diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractHttpClientTransport.java b/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractHttpClientTransport.java
new file mode 100644
index 0000000000..46cf76aa77
--- /dev/null
+++ b/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractHttpClientTransport.java
@@ -0,0 +1,233 @@
+//
+// ========================================================================
+// Copyright (c) 1995-2013 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.client;
+
+import java.io.IOException;
+import java.net.ConnectException;
+import java.net.SocketAddress;
+import java.net.SocketException;
+import java.nio.channels.SelectionKey;
+import java.nio.channels.SocketChannel;
+import javax.net.ssl.SSLEngine;
+
+import org.eclipse.jetty.http.HttpScheme;
+import org.eclipse.jetty.io.Connection;
+import org.eclipse.jetty.io.EndPoint;
+import org.eclipse.jetty.io.SelectChannelEndPoint;
+import org.eclipse.jetty.io.SelectorManager;
+import org.eclipse.jetty.io.ssl.SslConnection;
+import org.eclipse.jetty.util.Promise;
+import org.eclipse.jetty.util.component.ContainerLifeCycle;
+import org.eclipse.jetty.util.log.Log;
+import org.eclipse.jetty.util.log.Logger;
+import org.eclipse.jetty.util.ssl.SslContextFactory;
+
+public abstract class AbstractHttpClientTransport extends ContainerLifeCycle implements HttpClientTransport
+{
+ protected static final Logger LOG = Log.getLogger(HttpClientTransport.class);
+
+ private final int selectors;
+ private volatile HttpClient client;
+ private volatile SelectorManager selectorManager;
+
+ protected AbstractHttpClientTransport(int selectors)
+ {
+ this.selectors = selectors;
+ }
+
+ protected HttpClient getHttpClient()
+ {
+ return client;
+ }
+
+ @Override
+ public void setHttpClient(HttpClient client)
+ {
+ this.client = client;
+ }
+
+ @Override
+ protected void doStart() throws Exception
+ {
+ selectorManager = newSelectorManager(client);
+ selectorManager.setConnectTimeout(client.getConnectTimeout());
+ addBean(selectorManager);
+ super.doStart();
+ }
+
+ @Override
+ public void connect(HttpDestination destination, SocketAddress address, Promise<org.eclipse.jetty.client.api.Connection> promise)
+ {
+ SocketChannel channel = null;
+ try
+ {
+ channel = SocketChannel.open();
+ HttpClient client = destination.getHttpClient();
+ SocketAddress bindAddress = client.getBindAddress();
+ if (bindAddress != null)
+ channel.bind(bindAddress);
+ configure(client, channel);
+ channel.configureBlocking(false);
+ channel.connect(address);
+
+ ConnectionCallback callback = new ConnectionCallback(destination, promise);
+ selectorManager.connect(channel, callback);
+ }
+ // Must catch all exceptions, since some like
+ // UnresolvedAddressException are not IOExceptions.
+ catch (Throwable x)
+ {
+ try
+ {
+ if (channel != null)
+ channel.close();
+ }
+ catch (IOException xx)
+ {
+ LOG.ignore(xx);
+ }
+ finally
+ {
+ promise.failed(x);
+ }
+ }
+ }
+
+ protected void configure(HttpClient client, SocketChannel channel) throws SocketException
+ {
+ channel.socket().setTcpNoDelay(client.isTCPNoDelay());
+ }
+
+ protected SelectorManager newSelectorManager(HttpClient client)
+ {
+ return new ClientSelectorManager(client, selectors);
+ }
+
+ protected SslConnection createSslConnection(EndPoint endPoint, HttpDestination destination)
+ {
+ HttpClient httpClient = destination.getHttpClient();
+ SslContextFactory sslContextFactory = httpClient.getSslContextFactory();
+ SSLEngine engine = sslContextFactory.newSSLEngine(destination.getHost(), destination.getPort());
+ engine.setUseClientMode(true);
+
+ SslConnection sslConnection = newSslConnection(httpClient, endPoint, engine);
+ sslConnection.setRenegotiationAllowed(sslContextFactory.isRenegotiationAllowed());
+ endPoint.setConnection(sslConnection);
+ EndPoint appEndPoint = sslConnection.getDecryptedEndPoint();
+ Connection connection = newConnection(appEndPoint, destination);
+ appEndPoint.setConnection(connection);
+
+ return sslConnection;
+ }
+
+ protected SslConnection newSslConnection(HttpClient httpClient, EndPoint endPoint, SSLEngine engine)
+ {
+ return new SslConnection(httpClient.getByteBufferPool(), httpClient.getExecutor(), endPoint, engine);
+ }
+
+ protected abstract Connection newConnection(EndPoint endPoint, HttpDestination destination);
+
+ protected org.eclipse.jetty.client.api.Connection tunnel(EndPoint endPoint, HttpDestination destination, org.eclipse.jetty.client.api.Connection connection)
+ {
+ SslConnection sslConnection = createSslConnection(endPoint, destination);
+ Connection result = sslConnection.getDecryptedEndPoint().getConnection();
+ selectorManager.connectionClosed((Connection)connection);
+ selectorManager.connectionOpened(sslConnection);
+ LOG.debug("Tunnelled {} over {}", connection, result);
+ return (org.eclipse.jetty.client.api.Connection)result;
+ }
+
+ protected class ClientSelectorManager extends SelectorManager
+ {
+ private final HttpClient client;
+
+ protected ClientSelectorManager(HttpClient client, int selectors)
+ {
+ super(client.getExecutor(), client.getScheduler(), selectors);
+ this.client = client;
+ }
+
+ @Override
+ protected EndPoint newEndPoint(SocketChannel channel, ManagedSelector selector, SelectionKey key)
+ {
+ return new SelectChannelEndPoint(channel, selector, key, getScheduler(), client.getIdleTimeout());
+ }
+
+ @Override
+ public Connection newConnection(SocketChannel channel, EndPoint endPoint, Object attachment) throws IOException
+ {
+ ConnectionCallback callback = (ConnectionCallback)attachment;
+ HttpDestination destination = callback.destination;
+
+ SslContextFactory sslContextFactory = client.getSslContextFactory();
+ if (!destination.isProxied() && HttpScheme.HTTPS.is(destination.getScheme()))
+ {
+ if (sslContextFactory == null)
+ {
+ IOException failure = new ConnectException("Missing " + SslContextFactory.class.getSimpleName() + " for " + destination.getScheme() + " requests");
+ callback.failed(failure);
+ throw failure;
+ }
+ else
+ {
+ SslConnection sslConnection = createSslConnection(endPoint, destination);
+ callback.succeeded((org.eclipse.jetty.client.api.Connection)sslConnection.getDecryptedEndPoint().getConnection());
+ return sslConnection;
+ }
+ }
+ else
+ {
+ Connection connection = AbstractHttpClientTransport.this.newConnection(endPoint, destination);
+ callback.succeeded((org.eclipse.jetty.client.api.Connection)connection);
+ return connection;
+ }
+ }
+
+ @Override
+ protected void connectionFailed(SocketChannel channel, Throwable ex, Object attachment)
+ {
+ ConnectionCallback callback = (ConnectionCallback)attachment;
+ callback.failed(ex);
+ }
+ }
+
+ private class ConnectionCallback implements Promise<org.eclipse.jetty.client.api.Connection>
+ {
+ private final HttpDestination destination;
+ private final Promise<org.eclipse.jetty.client.api.Connection> promise;
+
+ private ConnectionCallback(HttpDestination destination, Promise<org.eclipse.jetty.client.api.Connection> promise)
+ {
+ this.destination = destination;
+ this.promise = promise;
+ }
+
+ @Override
+ public void succeeded(org.eclipse.jetty.client.api.Connection result)
+ {
+ promise.succeeded(result);
+ }
+
+ @Override
+ public void failed(Throwable x)
+ {
+ promise.failed(x);
+ }
+ }
+}
diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpChannel.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpChannel.java
new file mode 100644
index 0000000000..a87c6ed4b9
--- /dev/null
+++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpChannel.java
@@ -0,0 +1,76 @@
+//
+// ========================================================================
+// Copyright (c) 1995-2013 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.client;
+
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.jetty.client.api.Result;
+import org.eclipse.jetty.util.log.Log;
+import org.eclipse.jetty.util.log.Logger;
+
+public abstract class HttpChannel
+{
+ protected static final Logger LOG = Log.getLogger(HttpChannel.class);
+
+ private final AtomicReference<HttpExchange> exchange = new AtomicReference<>();
+ private final HttpDestination destination;
+
+ protected HttpChannel(HttpDestination destination)
+ {
+ this.destination = destination;
+ }
+
+ public HttpDestination getHttpDestination()
+ {
+ return destination;
+ }
+
+ public void associate(HttpExchange exchange)
+ {
+ if (!this.exchange.compareAndSet(null, exchange))
+ throw new UnsupportedOperationException("Pipelined requests not supported");
+ exchange.associate(this);
+ LOG.debug("{} associated to {}", exchange, this);
+ }
+
+ public HttpExchange disassociate()
+ {
+ HttpExchange exchange = this.exchange.getAndSet(null);
+ if (exchange != null)
+ exchange.disassociate(this);
+ LOG.debug("{} disassociated from {}", exchange, this);
+ return exchange;
+ }
+
+ public HttpExchange getHttpExchange()
+ {
+ return exchange.get();
+ }
+
+ public abstract void send();
+
+ public abstract void proceed(HttpExchange exchange, boolean proceed);
+
+ public abstract boolean abort(Throwable cause);
+
+ public void exchangeTerminated(Result result)
+ {
+ disassociate();
+ }
+}
diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java
index 3fe402825e..ef1fc0f6b4 100644
--- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java
+++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java
@@ -19,14 +19,11 @@
package org.eclipse.jetty.client;
import java.io.IOException;
-import java.net.ConnectException;
import java.net.CookieManager;
import java.net.CookiePolicy;
import java.net.CookieStore;
import java.net.SocketAddress;
-import java.net.SocketException;
import java.net.URI;
-import java.nio.channels.SelectionKey;
import java.nio.channels.SocketChannel;
import java.util.ArrayList;
import java.util.Collection;
@@ -40,8 +37,8 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executor;
+import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
-import javax.net.ssl.SSLEngine;
import org.eclipse.jetty.client.api.AuthenticationStore;
import org.eclipse.jetty.client.api.Connection;
@@ -50,16 +47,13 @@ import org.eclipse.jetty.client.api.Destination;
import org.eclipse.jetty.client.api.ProxyConfiguration;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.client.api.Response;
+import org.eclipse.jetty.client.http.HttpClientTransportOverHTTP;
import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.http.HttpScheme;
import org.eclipse.jetty.io.ByteBufferPool;
-import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.MappedByteBufferPool;
-import org.eclipse.jetty.io.SelectChannelEndPoint;
-import org.eclipse.jetty.io.SelectorManager;
-import org.eclipse.jetty.io.ssl.SslConnection;
import org.eclipse.jetty.util.Jetty;
import org.eclipse.jetty.util.Promise;
import org.eclipse.jetty.util.SocketAddressResolver;
@@ -116,6 +110,7 @@ public class HttpClient extends ContainerLifeCycle
private final List<Request.Listener> requestListeners = new ArrayList<>();
private final AuthenticationStore authenticationStore = new HttpAuthenticationStore();
private final Set<ContentDecoder.Factory> decoderFactories = new ContentDecoderFactorySet();
+ private final HttpClientTransport transport;
private final SslContextFactory sslContextFactory;
private volatile CookieManager cookieManager;
private volatile CookieStore cookieStore;
@@ -123,13 +118,12 @@ public class HttpClient extends ContainerLifeCycle
private volatile ByteBufferPool byteBufferPool;
private volatile Scheduler scheduler;
private volatile SocketAddressResolver resolver;
- private volatile SelectorManager selectorManager;
private volatile HttpField agentField = new HttpField(HttpHeader.USER_AGENT, "Jetty/" + Jetty.VERSION);
private volatile boolean followRedirects = true;
private volatile int maxConnectionsPerDestination = 64;
private volatile int maxRequestsQueuedPerDestination = 1024;
private volatile int requestBufferSize = 4096;
- private volatile int responseBufferSize = 4096;
+ private volatile int responseBufferSize = 16384;
private volatile int maxRedirects = 8;
private volatile SocketAddress bindAddress;
private volatile long connectTimeout = 15000;
@@ -137,6 +131,7 @@ public class HttpClient extends ContainerLifeCycle
private volatile long idleTimeout;
private volatile boolean tcpNoDelay = true;
private volatile boolean dispatchIO = true;
+ private volatile boolean strictEventOrdering = false;
private volatile ProxyConfiguration proxyConfig;
private volatile HttpField encodingField;
@@ -160,9 +155,20 @@ public class HttpClient extends ContainerLifeCycle
*/
public HttpClient(SslContextFactory sslContextFactory)
{
+ this(new HttpClientTransportOverHTTP(), sslContextFactory);
+ }
+
+ public HttpClient(HttpClientTransport transport, SslContextFactory sslContextFactory)
+ {
+ this.transport = transport;
this.sslContextFactory = sslContextFactory;
}
+ public HttpClientTransport getTransport()
+ {
+ return transport;
+ }
+
/**
* @return the {@link SslContextFactory} that manages TLS encryption
* @see #HttpClient(SslContextFactory)
@@ -196,11 +202,10 @@ public class HttpClient extends ContainerLifeCycle
scheduler = new ScheduledExecutorScheduler(name + "-scheduler", false);
addBean(scheduler);
- resolver = new SocketAddressResolver(executor, scheduler, getAddressResolutionTimeout());
+ addBean(transport);
+ transport.setHttpClient(this);
- selectorManager = newSelectorManager();
- selectorManager.setConnectTimeout(getConnectTimeout());
- addBean(selectorManager);
+ resolver = new SocketAddressResolver(executor, scheduler, getAddressResolutionTimeout());
handlers.add(new ContinueProtocolHandler(this));
handlers.add(new RedirectProtocolHandler(this));
@@ -215,11 +220,6 @@ public class HttpClient extends ContainerLifeCycle
super.doStart();
}
- protected SelectorManager newSelectorManager()
- {
- return new ClientSelectorManager(getExecutor(), getScheduler());
- }
-
private CookieManager newCookieManager()
{
return new CookieManager(getCookieStore(), CookiePolicy.ACCEPT_ALL);
@@ -246,10 +246,10 @@ public class HttpClient extends ContainerLifeCycle
}
/**
- * Returns a <em>non</em> thread-safe list of {@link Request.Listener}s that can be modified before
+ * Returns a <em>non</em> thread-safe list of {@link org.eclipse.jetty.client.api.Request.Listener}s that can be modified before
* performing requests.
*
- * @return a list of {@link Request.Listener} that can be used to add and remove listeners
+ * @return a list of {@link org.eclipse.jetty.client.api.Request.Listener} that can be used to add and remove listeners
*/
public List<Request.Listener> getRequestListeners()
{
@@ -387,9 +387,12 @@ public class HttpClient extends ContainerLifeCycle
protected Request copyRequest(Request oldRequest, URI newURI)
{
Request newRequest = new HttpRequest(this, oldRequest.getConversationID(), newURI);
- newRequest.method(oldRequest.method())
+ newRequest.method(oldRequest.getMethod())
.version(oldRequest.getVersion())
- .content(oldRequest.getContent());
+ .content(oldRequest.getContent())
+ .idleTimeout(oldRequest.getIdleTimeout(), TimeUnit.MILLISECONDS)
+ .timeout(oldRequest.getTimeout(), TimeUnit.MILLISECONDS)
+ .followRedirects(oldRequest.isFollowRedirects());
for (HttpField header : oldRequest.getHeaders())
{
// We have a new URI, so skip the host header if present
@@ -414,7 +417,7 @@ public class HttpClient extends ContainerLifeCycle
return newRequest;
}
- protected String address(String scheme, String host, int port)
+ public String address(String scheme, String host, int port)
{
StringBuilder result = new StringBuilder();
URIUtil.appendSchemeHostPort(result, scheme, host, port);
@@ -447,7 +450,7 @@ public class HttpClient extends ContainerLifeCycle
HttpDestination destination = destinations.get(address);
if (destination == null)
{
- destination = new HttpDestination(this, scheme, host, port);
+ destination = transport.newHttpDestination(scheme, host, port);
if (isRunning())
{
HttpDestination existing = destinations.putIfAbsent(address, destination);
@@ -489,28 +492,7 @@ public class HttpClient extends ContainerLifeCycle
@Override
public void succeeded(SocketAddress socketAddress)
{
- SocketChannel channel = null;
- try
- {
- channel = SocketChannel.open();
- SocketAddress bindAddress = getBindAddress();
- if (bindAddress != null)
- channel.bind(bindAddress);
- configure(channel);
- channel.configureBlocking(false);
- channel.connect(socketAddress);
-
- ConnectionCallback callback = new ConnectionCallback(destination, promise);
- selectorManager.connect(channel, callback);
- }
- // Must catch all exceptions, since some like
- // UnresolvedAddressException are not IOExceptions.
- catch (Throwable x)
- {
- if (channel != null)
- close(channel);
- promise.failed(x);
- }
+ transport.connect(destination, socketAddress, promise);
}
@Override
@@ -521,23 +503,6 @@ public class HttpClient extends ContainerLifeCycle
});
}
- protected void configure(SocketChannel channel) throws SocketException
- {
- channel.socket().setTcpNoDelay(isTCPNoDelay());
- }
-
- private void close(SocketChannel channel)
- {
- try
- {
- channel.close();
- }
- catch (IOException x)
- {
- LOG.ignore(x);
- }
- }
-
protected HttpConversation getConversation(long id, boolean create)
{
HttpConversation conversation = conversations.get(id);
@@ -729,11 +694,6 @@ public class HttpClient extends ContainerLifeCycle
this.scheduler = scheduler;
}
- protected SelectorManager getSelectorManager()
- {
- return selectorManager;
- }
-
/**
* @return the max number of connections that this {@link HttpClient} opens to {@link Destination}s
*/
@@ -879,6 +839,41 @@ public class HttpClient extends ContainerLifeCycle
}
/**
+ * @return whether request events must be strictly ordered
+ */
+ public boolean isStrictEventOrdering()
+ {
+ return strictEventOrdering;
+ }
+
+ /**
+ * Whether request events must be strictly ordered.
+ * <p />
+ * {@link org.eclipse.jetty.client.api.Response.CompleteListener}s may send a second request.
+ * If the second request is for the same destination, there is an inherent race
+ * condition for the use of the connection: the first request may still be associated with the
+ * connection, so the second request cannot use that connection and is forced to open another one.
+ * <p />
+ * From the point of view of connection usage, the connection is reusable just before the "complete"
+ * event, so it would be possible to reuse that connection from {@link org.eclipse.jetty.client.api.Response.CompleteListener}s;
+ * but in this case the second request's events will fire before the "complete" events of the first
+ * request.
+ * <p />
+ * This setting enforces strict event ordering so that a "begin" event of a second request can never
+ * fire before the "complete" event of a first request, but at the expense of an increased usage
+ * of connections.
+ * <p />
+ * When not enforced, a "begin" event of a second request may happen before the "complete" event of
+ * a first request and allow for better usage of connections.
+ *
+ * @param strictEventOrdering whether request events must be strictly ordered
+ */
+ public void setStrictEventOrdering(boolean strictEventOrdering)
+ {
+ this.strictEventOrdering = strictEventOrdering;
+ }
+
+ /**
* @return the forward proxy configuration
*/
public ProxyConfiguration getProxyConfiguration()
@@ -916,16 +911,6 @@ public class HttpClient extends ContainerLifeCycle
return HttpScheme.HTTPS.is(scheme) ? port == 443 : port == 80;
}
- protected HttpConnection newHttpConnection(HttpClient httpClient, EndPoint endPoint, HttpDestination destination)
- {
- return new HttpConnection(httpClient, endPoint, destination);
- }
-
- protected SslConnection newSslConnection(HttpClient httpClient, EndPoint endPoint, SSLEngine engine)
- {
- return new SslConnection(httpClient.getByteBufferPool(), httpClient.getExecutor(), endPoint, engine);
- }
-
@Override
public void dump(Appendable out, String indent) throws IOException
{
@@ -933,113 +918,6 @@ public class HttpClient extends ContainerLifeCycle
dump(out, indent, getBeans(), destinations.values());
}
- protected Connection tunnel(Connection connection)
- {
- HttpConnection httpConnection = (HttpConnection)connection;
- HttpDestination destination = httpConnection.getDestination();
- SslConnection sslConnection = createSslConnection(destination, httpConnection.getEndPoint());
- Connection result = (Connection)sslConnection.getDecryptedEndPoint().getConnection();
- selectorManager.connectionClosed(httpConnection);
- selectorManager.connectionOpened(sslConnection);
- LOG.debug("Tunnelled {} over {}", connection, result);
- return result;
- }
-
- private SslConnection createSslConnection(HttpDestination destination, EndPoint endPoint)
- {
- SSLEngine engine = sslContextFactory.newSSLEngine(destination.getHost(), destination.getPort());
- engine.setUseClientMode(true);
-
- SslConnection sslConnection = newSslConnection(HttpClient.this, endPoint, engine);
- sslConnection.setRenegotiationAllowed(sslContextFactory.isRenegotiationAllowed());
- endPoint.setConnection(sslConnection);
- EndPoint appEndPoint = sslConnection.getDecryptedEndPoint();
- HttpConnection connection = newHttpConnection(this, appEndPoint, destination);
- appEndPoint.setConnection(connection);
-
- return sslConnection;
- }
-
- protected class ClientSelectorManager extends SelectorManager
- {
- public ClientSelectorManager(Executor executor, Scheduler scheduler)
- {
- this(executor, scheduler, 1);
- }
-
- public ClientSelectorManager(Executor executor, Scheduler scheduler, int selectors)
- {
- super(executor, scheduler, selectors);
- }
-
- @Override
- protected EndPoint newEndPoint(SocketChannel channel, ManagedSelector selector, SelectionKey key)
- {
- return new SelectChannelEndPoint(channel, selector, key, getScheduler(), getIdleTimeout());
- }
-
- @Override
- public org.eclipse.jetty.io.Connection newConnection(SocketChannel channel, EndPoint endPoint, Object attachment) throws IOException
- {
- ConnectionCallback callback = (ConnectionCallback)attachment;
- HttpDestination destination = callback.destination;
-
- SslContextFactory sslContextFactory = getSslContextFactory();
- if (!destination.isProxied() && HttpScheme.HTTPS.is(destination.getScheme()))
- {
- if (sslContextFactory == null)
- {
- IOException failure = new ConnectException("Missing " + SslContextFactory.class.getSimpleName() + " for " + destination.getScheme() + " requests");
- callback.failed(failure);
- throw failure;
- }
- else
- {
- SslConnection sslConnection = createSslConnection(destination, endPoint);
- callback.succeeded((Connection)sslConnection.getDecryptedEndPoint().getConnection());
- return sslConnection;
- }
- }
- else
- {
- HttpConnection connection = newHttpConnection(HttpClient.this, endPoint, destination);
- callback.succeeded(connection);
- return connection;
- }
- }
-
- @Override
- protected void connectionFailed(SocketChannel channel, Throwable ex, Object attachment)
- {
- ConnectionCallback callback = (ConnectionCallback)attachment;
- callback.failed(ex);
- }
- }
-
- private class ConnectionCallback implements Promise<Connection>
- {
- private final HttpDestination destination;
- private final Promise<Connection> promise;
-
- private ConnectionCallback(HttpDestination destination, Promise<Connection> promise)
- {
- this.destination = destination;
- this.promise = promise;
- }
-
- @Override
- public void succeeded(Connection result)
- {
- promise.succeeded(result);
- }
-
- @Override
- public void failed(Throwable x)
- {
- promise.failed(x);
- }
- }
-
private class ContentDecoderFactorySet implements Set<ContentDecoder.Factory>
{
private final Set<ContentDecoder.Factory> set = new HashSet<>();
diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClientTransport.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClientTransport.java
new file mode 100644
index 0000000000..de943a61db
--- /dev/null
+++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClientTransport.java
@@ -0,0 +1,79 @@
+//
+// ========================================================================
+// Copyright (c) 1995-2013 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.client;
+
+import java.net.SocketAddress;
+
+import org.eclipse.jetty.client.api.Connection;
+import org.eclipse.jetty.util.Promise;
+
+/**
+ * {@link HttpClientTransport} represents what transport implementations should provide
+ * in order to plug-in a different transport for {@link HttpClient}.
+ * <p/>
+ * While the {@link HttpClient} APIs define the HTTP semantic (request, response, headers, etc.)
+ * <em>how</em> a HTTP exchange is carried over the network depends on implementations of this class.
+ * <p/>
+ * The default implementation uses the HTTP protocol to carry over the network the HTTP exchange,
+ * but the HTTP exchange may also be carried using the SPDY protocol or the FCGI protocol or, in future,
+ * other protocols.
+ */
+public interface HttpClientTransport
+{
+ /**
+ * Sets the {@link HttpClient} instance on this transport.
+ * <p />
+ * This is needed because of a chicken-egg problem: in order to create the {@link HttpClient}
+ * a {@link HttpClientTransport} is needed, that therefore cannot have a reference yet to the
+ * {@link HttpClient}.
+ *
+ * @param client the {@link HttpClient} that uses this transport.
+ */
+ public void setHttpClient(HttpClient client);
+
+ /**
+ * Creates a new, transport-specific, {@link HttpDestination} object.
+ * <p />
+ * {@link HttpDestination} controls the destination-connection cardinality: protocols like
+ * HTTP have 1-N cardinality, while multiplexed protocols like SPDY have a 1-1 cardinality.
+ *
+ * @param scheme the destination scheme
+ * @param host the destination host
+ * @param port the destination port
+ * @return a new, transport-specific, {@link HttpDestination} object
+ */
+ public HttpDestination newHttpDestination(String scheme, String host, int port);
+
+ /**
+ * Establishes a physical connection to the given {@code address}.
+ *
+ * @param destination the destination
+ * @param address the address to connect to
+ * @param promise the promise to notify when the connection succeeds or fails
+ */
+ public void connect(HttpDestination destination, SocketAddress address, Promise<Connection> promise);
+
+ /**
+ * Establishes an encrypted tunnel over the given {@code connection}
+ *
+ * @param connection the connection to tunnel
+ * @return the tunnelled connection
+ */
+ public Connection tunnel(Connection connection);
+}
diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java
index dfd11c25b0..e09079b1ca 100644
--- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java
+++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java
@@ -21,10 +21,7 @@ package org.eclipse.jetty.client;
import java.net.HttpCookie;
import java.net.URI;
import java.util.ArrayList;
-import java.util.Enumeration;
import java.util.List;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicReference;
import org.eclipse.jetty.client.api.Authentication;
import org.eclipse.jetty.client.api.Connection;
@@ -37,134 +34,56 @@ import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.HttpHeaderValue;
import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.http.HttpVersion;
-import org.eclipse.jetty.io.AbstractConnection;
-import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.util.log.Log;
-import org.eclipse.jetty.util.log.Logger;
-public class HttpConnection extends AbstractConnection implements Connection
+public abstract class HttpConnection implements Connection
{
- private static final Logger LOG = Log.getLogger(HttpConnection.class);
private static final HttpField CHUNKED_FIELD = new HttpField(HttpHeader.TRANSFER_ENCODING, HttpHeaderValue.CHUNKED);
- private final AtomicReference<HttpExchange> exchange = new AtomicReference<>();
- private final HttpClient client;
private final HttpDestination destination;
- private final HttpSender sender;
- private final HttpReceiver receiver;
- private long idleTimeout;
- private boolean closed;
- public HttpConnection(HttpClient client, EndPoint endPoint, HttpDestination destination)
+ protected HttpConnection(HttpDestination destination)
{
- super(endPoint, client.getExecutor(), client.isDispatchIO());
- this.client = client;
this.destination = destination;
- this.sender = new HttpSender(this);
- this.receiver = new HttpReceiver(this);
}
public HttpClient getHttpClient()
{
- return client;
+ return destination.getHttpClient();
}
- public HttpDestination getDestination()
+ public HttpDestination getHttpDestination()
{
return destination;
}
@Override
- public void onOpen()
- {
- super.onOpen();
- fillInterested();
- }
-
- @Override
- public void onClose()
- {
- closed = true;
- super.onClose();
- }
-
- protected boolean isClosed()
- {
- return closed;
- }
-
- @Override
- protected boolean onReadTimeout()
- {
- LOG.debug("{} idle timeout", this);
-
- HttpExchange exchange = getExchange();
- if (exchange != null)
- idleTimeout();
- else
- destination.remove(this);
-
- return true;
- }
-
- protected void idleTimeout()
- {
- receiver.idleTimeout();
- }
-
- @Override
public void send(Request request, Response.CompleteListener listener)
{
ArrayList<Response.ResponseListener> listeners = new ArrayList<>(2);
if (request.getTimeout() > 0)
{
TimeoutCompleteListener timeoutListener = new TimeoutCompleteListener(request);
- timeoutListener.schedule(client.getScheduler());
+ timeoutListener.schedule(getHttpClient().getScheduler());
listeners.add(timeoutListener);
}
if (listener != null)
listeners.add(listener);
- HttpConversation conversation = client.getConversation(request.getConversationID(), true);
- HttpExchange exchange = new HttpExchange(conversation, getDestination(), request, listeners);
+ HttpConversation conversation = getHttpClient().getConversation(request.getConversationID(), true);
+ HttpExchange exchange = new HttpExchange(conversation, getHttpDestination(), request, listeners);
+
send(exchange);
}
- public void send(HttpExchange exchange)
- {
- Request request = exchange.getRequest();
- normalizeRequest(request);
-
- // Save the old idle timeout to restore it
- EndPoint endPoint = getEndPoint();
- idleTimeout = endPoint.getIdleTimeout();
- endPoint.setIdleTimeout(request.getIdleTimeout());
-
- // Associate the exchange to the connection
- associate(exchange);
+ protected abstract void send(HttpExchange exchange);
- sender.send(exchange);
- }
-
- private void normalizeRequest(Request request)
+ protected void normalizeRequest(Request request)
{
- if (request.method() == null)
- request.method(HttpMethod.GET);
-
- if (request.getVersion() == null)
- request.version(HttpVersion.HTTP_1_1);
-
- if (request.getIdleTimeout() <= 0)
- request.idleTimeout(client.getIdleTimeout(), TimeUnit.MILLISECONDS);
-
- String method = request.method();
+ String method = request.getMethod();
HttpVersion version = request.getVersion();
HttpFields headers = request.getHeaders();
ContentProvider content = request.getContent();
- if (request.getAgent() == null)
- headers.put(client.getUserAgentField());
-
// Make sure the path is there
String path = request.getPath();
if (path.trim().length() == 0)
@@ -182,7 +101,7 @@ public class HttpConnection extends AbstractConnection implements Connection
if (version.getVersion() > 10)
{
if (!headers.containsKey(HttpHeader.HOST.asString()))
- headers.put(getDestination().getHostField());
+ headers.put(getHttpDestination().getHostField());
}
// Add content headers
@@ -202,7 +121,7 @@ public class HttpConnection extends AbstractConnection implements Connection
}
// Cookies
- List<HttpCookie> cookies = client.getCookieStore().get(request.getURI());
+ List<HttpCookie> cookies = getHttpClient().getCookieStore().get(request.getURI());
StringBuilder cookieString = null;
for (int i = 0; i < cookies.size(); ++i)
{
@@ -218,140 +137,8 @@ public class HttpConnection extends AbstractConnection implements Connection
// Authorization
URI authenticationURI = destination.isProxied() ? destination.getProxyURI() : request.getURI();
- Authentication.Result authnResult = client.getAuthenticationStore().findAuthenticationResult(authenticationURI);
+ Authentication.Result authnResult = getHttpClient().getAuthenticationStore().findAuthenticationResult(authenticationURI);
if (authnResult != null)
authnResult.apply(request);
-
- if (!headers.containsKey(HttpHeader.ACCEPT_ENCODING.asString()))
- {
- HttpField acceptEncodingField = client.getAcceptEncodingField();
- if (acceptEncodingField != null)
- headers.put(acceptEncodingField);
- }
- }
-
- public HttpExchange getExchange()
- {
- return exchange.get();
- }
-
- protected void associate(HttpExchange exchange)
- {
- if (!this.exchange.compareAndSet(null, exchange))
- throw new UnsupportedOperationException("Pipelined requests not supported");
- exchange.setConnection(this);
- LOG.debug("{} associated to {}", exchange, this);
- }
-
- protected HttpExchange disassociate()
- {
- HttpExchange exchange = this.exchange.getAndSet(null);
- if (exchange != null)
- exchange.setConnection(null);
- LOG.debug("{} disassociated from {}", exchange, this);
- return exchange;
- }
-
- @Override
- public void onFillable()
- {
- HttpExchange exchange = getExchange();
- if (exchange != null)
- {
- receive();
- }
- else
- {
- // If there is no exchange, then could be either a remote close,
- // or garbage bytes; in both cases we close the connection
- close();
- }
- }
-
- protected void receive()
- {
- receiver.receive();
- }
-
- public void complete(HttpExchange exchange, boolean success)
- {
- HttpExchange existing = disassociate();
- if (existing == exchange)
- {
- exchange.awaitTermination();
-
- // Restore idle timeout
- getEndPoint().setIdleTimeout(idleTimeout);
-
- LOG.debug("{} disassociated from {}", exchange, this);
- if (success)
- {
- HttpFields responseHeaders = exchange.getResponse().getHeaders();
- Enumeration<String> values = responseHeaders.getValues(HttpHeader.CONNECTION.asString(), ",");
- if (values != null)
- {
- while (values.hasMoreElements())
- {
- if ("close".equalsIgnoreCase(values.nextElement()))
- {
- close();
- return;
- }
- }
- }
- destination.release(this);
- }
- else
- {
- close();
- }
- }
- else if (existing == null)
- {
- // It is possible that the exchange has already been disassociated,
- // for example if the connection idle timeouts: this will fail
- // the response, but the request may still be under processing.
- // Eventually the request will also fail as the connection is closed
- // and will arrive here without an exchange being present.
- // We just ignore this fact, as the exchange has already been processed
- }
- else
- {
- throw new IllegalStateException();
- }
- }
-
- public boolean abort(Throwable cause)
- {
- // We want the return value to be that of the response
- // because if the response has already successfully
- // arrived then we failed to abort the exchange
- sender.abort(cause);
- return receiver.abort(cause);
- }
-
- public void proceed(boolean proceed)
- {
- sender.proceed(proceed);
- }
-
- @Override
- public void close()
- {
- destination.remove(this);
- getEndPoint().shutdownOutput();
- LOG.debug("{} oshut", this);
- getEndPoint().close();
- LOG.debug("{} closed", this);
- }
-
- @Override
- public String toString()
- {
- return String.format("%s@%x(l:%s <-> r:%s)",
- HttpConnection.class.getSimpleName(),
- hashCode(),
- getEndPoint().getLocalAddress(),
- getEndPoint().getRemoteAddress());
}
}
diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpContent.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpContent.java
new file mode 100644
index 0000000000..989e7f22a5
--- /dev/null
+++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpContent.java
@@ -0,0 +1,156 @@
+//
+// ========================================================================
+// Copyright (c) 1995-2013 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.client;
+
+import java.nio.ByteBuffer;
+import java.util.Collections;
+import java.util.Iterator;
+
+import org.eclipse.jetty.client.api.ContentProvider;
+import org.eclipse.jetty.client.util.DeferredContentProvider;
+import org.eclipse.jetty.util.BufferUtil;
+
+/**
+ * {@link HttpContent} is a stateful, linear representation of the request content provided
+ * by a {@link ContentProvider} that can be traversed one-way to obtain content buffers to
+ * send to a HTTP server.
+ * <p />
+ * {@link HttpContent} offers the notion of a one-way cursor to traverse the content.
+ * The cursor starts in a virtual "before" position and can be advanced using {@link #advance()}
+ * until it reaches a virtual "after" position where the content is fully consumed.
+ * <pre>
+ * +---+ +---+ +---+ +---+ +---+
+ * | | | | | | | | | |
+ * +---+ +---+ +---+ +---+ +---+
+ * ^ ^ ^ ^
+ * | | --> advance() | |
+ * | | last |
+ * | | |
+ * before | after
+ * |
+ * current
+ * </pre>
+ * At each valid (non-before and non-after) cursor position, {@link HttpContent} provides the following state:
+ * <ul>
+ * <li>the buffer containing the content to send, via {@link #getByteBuffer()}</li>
+ * <li>a copy of the content buffer that can be used for notifications, via {@link #getContent()}</li>
+ * <li>whether the buffer to write is the last one, via {@link #isLast()}</li>
+ * </ul>
+ * {@link HttpContent} may not have content, if the related {@link ContentProvider} is {@code null}, and this
+ * is reflected by {@link #hasContent()}.
+ * <p />
+ * {@link HttpContent} may have {@link DeferredContentProvider deferred content}, in which case {@link #advance()}
+ * moves the cursor to a position that provides {@code null} {@link #getByteBuffer() buffer} and
+ * {@link #getContent() content}. When the deferred content is available, a further call to {@link #advance()}
+ * will move the cursor to a position that provides non {@code null} buffer and content.
+ */
+public class HttpContent
+{
+ private static final ByteBuffer AFTER = ByteBuffer.allocate(0);
+
+ private final ContentProvider provider;
+ private final Iterator<ByteBuffer> iterator;
+ private ByteBuffer buffer;
+ private volatile ByteBuffer content;
+
+ public HttpContent(ContentProvider provider)
+ {
+ this.provider = provider;
+ this.iterator = provider == null ? Collections.<ByteBuffer>emptyIterator() : provider.iterator();
+ }
+
+ /**
+ * @return whether there is any content at all
+ */
+ public boolean hasContent()
+ {
+ return provider != null;
+ }
+
+ /**
+ * @return whether the cursor points to the last content
+ */
+ public boolean isLast()
+ {
+ return !iterator.hasNext();
+ }
+
+ /**
+ * @return the {@link ByteBuffer} containing the content at the cursor's position
+ */
+ public ByteBuffer getByteBuffer()
+ {
+ return buffer;
+ }
+
+ /**
+ * @return a {@link ByteBuffer#slice()} of {@link #getByteBuffer()} at the cursor's position
+ */
+ public ByteBuffer getContent()
+ {
+ return content;
+ }
+
+ /**
+ * Advances the cursor to the next block of content.
+ * <p />
+ * The next block of content may be valid (which yields a non-null buffer
+ * returned by {@link #getByteBuffer()}), but may also be deferred
+ * (which yields a null buffer returned by {@link #getByteBuffer()}).
+ * <p />
+ * If the block of content pointed by the new cursor position is valid, this method returns true.
+ *
+ * @return true if there is content at the new cursor's position, false otherwise.
+ */
+ public boolean advance()
+ {
+ if (isLast())
+ {
+ if (content != AFTER)
+ content = buffer = AFTER;
+ return false;
+ }
+ else
+ {
+ ByteBuffer buffer = this.buffer = iterator.next();
+ content = buffer == null ? null : buffer.slice();
+ return buffer != null;
+ }
+ }
+
+ /**
+ * @return whether the cursor has been advanced past the {@link #isLast() last} position.
+ */
+ public boolean isConsumed()
+ {
+ return content == AFTER;
+ }
+
+ @Override
+ public String toString()
+ {
+ return String.format("%s@%x - has=%b,last=%b,consumed=%b,buffer=%s",
+ getClass().getSimpleName(),
+ hashCode(),
+ hasContent(),
+ isLast(),
+ isConsumed(),
+ BufferUtil.toDetailString(getContent()));
+ }
+}
diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java
index 9b2caf889d..cf4c2dfe90 100644
--- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java
+++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java
@@ -22,13 +22,10 @@ import java.io.Closeable;
import java.io.IOException;
import java.net.URI;
import java.nio.channels.AsynchronousCloseException;
-import java.util.ArrayList;
import java.util.List;
import java.util.Queue;
-import java.util.concurrent.BlockingQueue;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
import org.eclipse.jetty.client.api.Connection;
import org.eclipse.jetty.client.api.Destination;
@@ -48,18 +45,15 @@ import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import org.eclipse.jetty.util.ssl.SslContextFactory;
-public class HttpDestination implements Destination, Closeable, Dumpable
+public abstract class HttpDestination implements Destination, Closeable, Dumpable
{
- private static final Logger LOG = Log.getLogger(HttpDestination.class);
+ protected static final Logger LOG = Log.getLogger(HttpDestination.class);
- private final AtomicInteger connectionCount = new AtomicInteger();
private final HttpClient client;
private final String scheme;
private final String host;
private final Address address;
private final Queue<HttpExchange> exchanges;
- private final BlockingQueue<Connection> idleConnections;
- private final BlockingQueue<Connection> activeConnections;
private final RequestNotifier requestNotifier;
private final ResponseNotifier responseNotifier;
private final Address proxyAddress;
@@ -72,14 +66,7 @@ public class HttpDestination implements Destination, Closeable, Dumpable
this.host = host;
this.address = new Address(host, port);
- int maxRequestsQueued = client.getMaxRequestsQueuedPerDestination();
- int capacity = Math.min(32, maxRequestsQueued);
- this.exchanges = new BlockingArrayQueue<>(capacity, capacity, maxRequestsQueued);
-
- int maxConnections = client.getMaxConnectionsPerDestination();
- capacity = Math.min(8, maxConnections);
- this.idleConnections = new BlockingArrayQueue<>(capacity, capacity, maxConnections);
- this.activeConnections = new BlockingArrayQueue<>(capacity, capacity, maxConnections);
+ this.exchanges = new BlockingArrayQueue<>(client.getMaxRequestsQueuedPerDestination());
this.requestNotifier = new RequestNotifier(client);
this.responseNotifier = new ResponseNotifier(client);
@@ -93,14 +80,14 @@ public class HttpDestination implements Destination, Closeable, Dumpable
hostField = new HttpField(HttpHeader.HOST, host);
}
- protected BlockingQueue<Connection> getIdleConnections()
+ public HttpClient getHttpClient()
{
- return idleConnections;
+ return client;
}
- protected BlockingQueue<Connection> getActiveConnections()
+ public Queue<HttpExchange> getHttpExchanges()
{
- return activeConnections;
+ return exchanges;
}
public RequestNotifier getRequestNotifier()
@@ -157,7 +144,7 @@ public class HttpDestination implements Destination, Closeable, Dumpable
return hostField;
}
- public void send(Request request, List<Response.ResponseListener> listeners)
+ protected void send(Request request, List<Response.ResponseListener> listeners)
{
if (!scheme.equals(request.getScheme()))
throw new IllegalArgumentException("Invalid request scheme " + request.getScheme() + " for destination " + this);
@@ -182,9 +169,7 @@ public class HttpDestination implements Destination, Closeable, Dumpable
{
LOG.debug("Queued {}", request);
requestNotifier.notifyQueued(request);
- Connection connection = acquire();
- if (connection != null)
- process(connection, false);
+ send();
}
}
else
@@ -199,6 +184,8 @@ public class HttpDestination implements Destination, Closeable, Dumpable
}
}
+ protected abstract void send();
+
public void newConnection(Promise<Connection> promise)
{
createConnection(new ProxyPromise(promise));
@@ -209,80 +196,24 @@ public class HttpDestination implements Destination, Closeable, Dumpable
client.newConnection(this, promise);
}
- protected Connection acquire()
+ public boolean remove(HttpExchange exchange)
{
- Connection result = idleConnections.poll();
- if (result != null)
- return result;
-
- final int maxConnections = client.getMaxConnectionsPerDestination();
- while (true)
- {
- int current = connectionCount.get();
- final int next = current + 1;
-
- if (next > maxConnections)
- {
- LOG.debug("Max connections per destination {} exceeded for {}", current, this);
- // Try again the idle connections
- return idleConnections.poll();
- }
-
- if (connectionCount.compareAndSet(current, next))
- {
- LOG.debug("Creating connection {}/{} for {}", next, maxConnections, this);
-
- // This is the promise that is being called when a connection (eventually proxied) succeeds or fails.
- Promise<Connection> promise = new Promise<Connection>()
- {
- @Override
- public void succeeded(Connection connection)
- {
- process(connection, true);
- }
-
- @Override
- public void failed(final Throwable x)
- {
- client.getExecutor().execute(new Runnable()
- {
- @Override
- public void run()
- {
- abort(x);
- }
- });
- }
- };
-
- // Create a new connection, and pass a ProxyPromise to establish a proxy tunnel, if needed.
- // Differently from the case where the connection is created explicitly by applications, here
- // we need to do a bit more logging and keep track of the connection count in case of failures.
- createConnection(new ProxyPromise(promise)
- {
- @Override
- public void succeeded(Connection connection)
- {
- LOG.debug("Created connection {}/{} {} for {}", next, maxConnections, connection, HttpDestination.this);
- super.succeeded(connection);
- }
-
- @Override
- public void failed(Throwable x)
- {
- LOG.debug("Connection failed {} for {}", x, HttpDestination.this);
- connectionCount.decrementAndGet();
- super.failed(x);
- }
- });
+ return exchanges.remove(exchange);
+ }
- // Try again the idle connections
- return idleConnections.poll();
- }
- }
+ public void close()
+ {
+ abort(new AsynchronousCloseException());
+ LOG.debug("Closed {}", this);
}
- private void abort(Throwable cause)
+ /**
+ * Aborts all the {@link HttpExchange}s queued in this destination.
+ *
+ * @param cause the abort cause
+ * @see #abort(HttpExchange, Throwable)
+ */
+ public void abort(Throwable cause)
{
HttpExchange exchange;
while ((exchange = exchanges.poll()) != null)
@@ -290,134 +221,11 @@ public class HttpDestination implements Destination, Closeable, Dumpable
}
/**
- * <p>Processes a new connection making it idle or active depending on whether requests are waiting to be sent.</p>
- * <p>A new connection is created when a request needs to be executed; it is possible that the request that
- * triggered the request creation is executed by another connection that was just released, so the new connection
- * may become idle.</p>
- * <p>If a request is waiting to be executed, it will be dequeued and executed by the new connection.</p>
+ * Aborts the given {@code exchange}, notifies listeners of the failure, and completes the exchange.
*
- * @param connection the new connection
- * @param dispatch whether to dispatch the processing to another thread
+ * @param exchange the {@link HttpExchange} to abort
+ * @param cause the abort cause
*/
- protected void process(Connection connection, boolean dispatch)
- {
- // Ugly cast, but lack of generic reification forces it
- final HttpConnection httpConnection = (HttpConnection)connection;
-
- final HttpExchange exchange = exchanges.poll();
- if (exchange == null)
- {
- LOG.debug("{} idle", httpConnection);
- if (!idleConnections.offer(httpConnection))
- {
- LOG.debug("{} idle overflow");
- httpConnection.close();
- }
- if (!client.isRunning())
- {
- LOG.debug("{} is stopping", client);
- remove(httpConnection);
- httpConnection.close();
- }
- }
- else
- {
- final Request request = exchange.getRequest();
- Throwable cause = request.getAbortCause();
- if (cause != null)
- {
- abort(exchange, cause);
- LOG.debug("Aborted before processing {}: {}", exchange, cause);
- }
- else
- {
- LOG.debug("{} active", httpConnection);
- if (!activeConnections.offer(httpConnection))
- {
- LOG.warn("{} active overflow");
- }
- if (dispatch)
- {
- client.getExecutor().execute(new Runnable()
- {
- @Override
- public void run()
- {
- httpConnection.send(exchange);
- }
- });
- }
- else
- {
- httpConnection.send(exchange);
- }
- }
- }
- }
-
- public void release(Connection connection)
- {
- LOG.debug("{} released", connection);
- if (client.isRunning())
- {
- boolean removed = activeConnections.remove(connection);
- if (removed)
- process(connection, false);
- else
- LOG.debug("{} explicit", connection);
- }
- else
- {
- LOG.debug("{} is stopped", client);
- remove(connection);
- connection.close();
- }
- }
-
- public void remove(Connection connection)
- {
- boolean removed = activeConnections.remove(connection);
- removed |= idleConnections.remove(connection);
- if (removed)
- {
- int open = connectionCount.decrementAndGet();
- LOG.debug("Removed connection {} for {} - open: {}", connection, this, open);
- }
-
- // We need to execute queued requests even if this connection failed.
- // We may create a connection that is not needed, but it will eventually
- // idle timeout, so no worries
- if (!exchanges.isEmpty())
- {
- connection = acquire();
- if (connection != null)
- process(connection, false);
- }
- }
-
- public void close()
- {
- for (Connection connection : idleConnections)
- connection.close();
- idleConnections.clear();
-
- // A bit drastic, but we cannot wait for all requests to complete
- for (Connection connection : activeConnections)
- connection.close();
- activeConnections.clear();
-
- abort(new AsynchronousCloseException());
-
- connectionCount.set(0);
-
- LOG.debug("Closed {}", this);
- }
-
- public boolean remove(HttpExchange exchange)
- {
- return exchanges.remove(exchange);
- }
-
protected void abort(HttpExchange exchange, Throwable cause)
{
Request request = exchange.getRequest();
@@ -431,8 +239,7 @@ public class HttpDestination implements Destination, Closeable, Dumpable
protected void tunnelSucceeded(Connection connection, Promise<Connection> promise)
{
// Wrap the connection with TLS
- Connection tunnel = client.tunnel(connection);
- promise.succeeded(tunnel);
+ promise.succeeded(client.getTransport().tunnel(connection));
}
protected void tunnelFailed(Connection connection, Promise<Connection> promise, Throwable failure)
@@ -451,22 +258,19 @@ public class HttpDestination implements Destination, Closeable, Dumpable
public void dump(Appendable out, String indent) throws IOException
{
ContainerLifeCycle.dumpObject(out, this + " - requests queued: " + exchanges.size());
- List<String> connections = new ArrayList<>();
- for (Connection connection : idleConnections)
- connections.add(connection + " - IDLE");
- for (Connection connection : activeConnections)
- connections.add(connection + " - ACTIVE");
- ContainerLifeCycle.dump(out, indent, connections);
+ }
+
+ public String asString()
+ {
+ return client.address(getScheme(), getHost(), getPort());
}
@Override
public String toString()
{
- return String.format("%s(%s://%s:%d)%s",
+ return String.format("%s(%s)%s",
HttpDestination.class.getSimpleName(),
- getScheme(),
- getHost(),
- getPort(),
+ asString(),
proxyAddress == null ? "" : " via " + proxyAddress.getHost() + ":" + proxyAddress.getPort());
}
diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpExchange.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpExchange.java
index de043779ef..b370524997 100644
--- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpExchange.java
+++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpExchange.java
@@ -19,9 +19,9 @@
package org.eclipse.jetty.client;
import java.util.List;
-import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicMarkableReference;
+import java.util.concurrent.atomic.AtomicReference;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.client.api.Response;
@@ -33,14 +33,15 @@ public class HttpExchange
{
private static final Logger LOG = Log.getLogger(HttpExchange.class);
+ private final AtomicBoolean requestComplete = new AtomicBoolean();
+ private final AtomicBoolean responseComplete = new AtomicBoolean();
private final AtomicInteger complete = new AtomicInteger();
- private final CountDownLatch terminate = new CountDownLatch(2);
+ private final AtomicReference<HttpChannel> channel = new AtomicReference<>();
private final HttpConversation conversation;
private final HttpDestination destination;
private final Request request;
private final List<Response.ResponseListener> listeners;
private final HttpResponse response;
- private volatile HttpConnection connection;
private volatile Throwable requestFailure;
private volatile Throwable responseFailure;
@@ -86,30 +87,47 @@ public class HttpExchange
return responseFailure;
}
- public void setConnection(HttpConnection connection)
+ public void associate(HttpChannel channel)
{
- this.connection = connection;
+ if (!this.channel.compareAndSet(null, channel))
+ throw new IllegalStateException();
}
- public AtomicMarkableReference<Result> requestComplete(Throwable failure)
+ public void disassociate(HttpChannel channel)
+ {
+ if (!this.channel.compareAndSet(channel, null))
+ throw new IllegalStateException();
+ }
+
+ public boolean requestComplete()
+ {
+ return requestComplete.compareAndSet(false, true);
+ }
+
+ public boolean responseComplete()
+ {
+ return responseComplete.compareAndSet(false, true);
+ }
+
+ public Result terminateRequest(Throwable failure)
{
int requestSuccess = 0b0011;
int requestFailure = 0b0001;
- return complete(failure == null ? requestSuccess : requestFailure, failure);
+ return terminate(failure == null ? requestSuccess : requestFailure, failure);
}
- public AtomicMarkableReference<Result> responseComplete(Throwable failure)
+ public Result terminateResponse(Throwable failure)
{
if (failure == null)
{
int responseSuccess = 0b1100;
- return complete(responseSuccess, failure);
+ return terminate(responseSuccess, failure);
}
else
{
proceed(false);
int responseFailure = 0b0100;
- return complete(responseFailure, failure);
+ return terminate(responseFailure, failure);
}
}
@@ -126,16 +144,10 @@ public class HttpExchange
* By using {@link AtomicInteger} to atomically sum these codes we can know
* whether the exchange is completed and whether is successful.
*
- * @param code the bits representing the status code for either the request or the response
- * @param failure the failure - if any - associated with the status code for either the request or the response
- * @return an AtomicMarkableReference holding whether the operation modified the
- * completion status and the {@link Result} - if any - associated with the status
+ * @return the {@link Result} - if any - associated with the status
*/
- private AtomicMarkableReference<Result> complete(int code, Throwable failure)
+ private Result terminate(int code, Throwable failure)
{
- Result result = null;
- boolean modified = false;
-
int current;
while (true)
{
@@ -147,7 +159,6 @@ public class HttpExchange
if (!complete.compareAndSet(current, candidate))
continue;
current = candidate;
- modified = true;
if ((code & 0b01) == 0b01)
requestFailure = failure;
else
@@ -157,19 +168,16 @@ public class HttpExchange
break;
}
- int completed = 0b0101;
- if ((current & completed) == completed)
+ int terminated = 0b0101;
+ if ((current & terminated) == terminated)
{
- if (modified)
- {
- // Request and response completed
- LOG.debug("{} complete", this);
- conversation.complete();
- }
- result = new Result(getRequest(), getRequestFailure(), getResponse(), getResponseFailure());
+ // Request and response terminated
+ LOG.debug("{} terminated", this);
+ conversation.complete();
+ return new Result(getRequest(), getRequestFailure(), getResponse(), getResponseFailure());
}
- return new AtomicMarkableReference<>(result, modified);
+ return null;
}
public boolean abort(Throwable cause)
@@ -182,12 +190,12 @@ public class HttpExchange
}
else
{
- HttpConnection connection = this.connection;
- // If there is no connection, this exchange is already completed
- if (connection == null)
+ HttpChannel channel = this.channel.get();
+ // If there is no channel, this exchange is already completed
+ if (channel == null)
return false;
- boolean aborted = connection.abort(cause);
+ boolean aborted = channel.abort(cause);
LOG.debug("Aborted while active ({}) {}: {}", aborted, this, cause);
return aborted;
}
@@ -195,6 +203,7 @@ public class HttpExchange
public void resetResponse(boolean success)
{
+ responseComplete.set(false);
int responseSuccess = 0b1100;
int responseFailure = 0b0100;
int code = success ? responseSuccess : responseFailure;
@@ -203,42 +212,25 @@ public class HttpExchange
public void proceed(boolean proceed)
{
- HttpConnection connection = this.connection;
- if (connection != null)
- connection.proceed(proceed);
- }
-
- public void terminateRequest()
- {
- terminate.countDown();
- }
-
- public void terminateResponse()
- {
- terminate.countDown();
- }
-
- public void awaitTermination()
- {
- try
- {
- terminate.await();
- }
- catch (InterruptedException x)
- {
- LOG.ignore(x);
- }
+ HttpChannel channel = this.channel.get();
+ if (channel != null)
+ channel.proceed(this, proceed);
}
- @Override
- public String toString()
+ private String toString(int code)
{
String padding = "0000";
- String status = Integer.toBinaryString(complete.get());
+ String status = Integer.toBinaryString(code);
return String.format("%s@%x status=%s%s",
HttpExchange.class.getSimpleName(),
hashCode(),
padding.substring(status.length()),
status);
}
+
+ @Override
+ public String toString()
+ {
+ return toString(complete.get());
+ }
}
diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpReceiver.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpReceiver.java
index 8bb6c6d3dc..4ee0e9c5a9 100644
--- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpReceiver.java
+++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpReceiver.java
@@ -18,7 +18,6 @@
package org.eclipse.jetty.client;
-import java.io.EOFException;
import java.io.IOException;
import java.net.URI;
import java.nio.ByteBuffer;
@@ -27,198 +26,169 @@ import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.concurrent.TimeoutException;
-import java.util.concurrent.atomic.AtomicMarkableReference;
import java.util.concurrent.atomic.AtomicReference;
import org.eclipse.jetty.client.api.Response;
import org.eclipse.jetty.client.api.Result;
import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpHeader;
-import org.eclipse.jetty.http.HttpMethod;
-import org.eclipse.jetty.http.HttpParser;
-import org.eclipse.jetty.http.HttpVersion;
-import org.eclipse.jetty.io.ByteBufferPool;
-import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.EofException;
+import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
-public class HttpReceiver implements HttpParser.ResponseHandler<ByteBuffer>
+/**
+ * {@link HttpReceiver} provides the abstract code to implement the various steps of the receive of HTTP responses.
+ * <p />
+ * {@link HttpReceiver} maintains a state machine that is updated when the steps of receiving a response are executed.
+ * <p />
+ * Subclasses must handle the transport-specific details, for example how to read from the raw socket and how to parse
+ * the bytes read from the socket. Then they have to call the methods defined in this class in the following order:
+ * <ol>
+ * <li>{@link #responseBegin(HttpExchange)}, when the HTTP response data containing the HTTP status code
+ * is available</li>
+ * <li>{@link #responseHeader(HttpExchange, HttpField)}, when a HTTP field is available</li>
+ * <li>{@link #responseHeaders(HttpExchange)}, when all HTTP headers are available</li>
+ * <li>{@link #respons