Eclipse Jetty® - Web Container & Clients - supports HTTP/2, HTTP/1.1, HTTP/1.0, websocket, servlets, and more
Go to file
Greg Wilkins 8c7e34f37d
Jetty 10.0.x immutable meta data (#4777)
Made HttpURI, HttpFields and MetaData immutable.  The first two follow the same builder pattern and MetaData is constructor injection only.

* Immutable version of HttpFields

Preserve API and usage of HttpFields class while providing a read only interface and immutable implementation.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable version of HttpFields

Use an ArrayList in HttpFields. While slightly slower than the array, it will mostly be used as a builder pattern for an Immutable

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable version of HttpFields

Fixed exception type.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable version of HttpFields

asImmutable method

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

Made HttpURIU immutable with a builder pattern.
MetaData immutable and working within http module.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

Fixes from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

Passing tests upto and including jetty-server

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

Cleanup of HttpURI.Builder API as suggested in PR.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

Added builder for MetaData.Request

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

more api fixes

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

WIP making HttpFiels itself immutable.  Currently working up to jetty-servlet.

Need to consider if content-length really is meta data and how much and when can we trust it.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

WIP

Need to consider if content-length really is meta data and how much and when can we trust it. Also need to consider difference between h2 and h1 authority in metadata.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

jetty-client and jetty-servlet passing tests.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

Better align the style of immutability between `HttpFields` and `HttpURI`.
They both now have static build() and from() methods, plus Builder and Immutable implementations.
Potentially `Builder` could be renamed as `Mutable`

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

http2-server tests passed

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

http2-client tests passed

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

cleann build?

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

fix

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

more test fixes

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

Cleanups, mostly using EMPTY when appropriate.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

Cleanups, use immutable

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

No trailers for connect

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

Fix CONNECT path handling

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

fixed rewrite query handling

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

rename Builders to Muttables

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

misc cleanups

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

Revert to using arrays due to garbage generated by streams and iterators (12% of a simple benchmark!).
Even if this garbage is an artifact of the JIT being disabled by observation, it can hide other allocations, so best to just use simple arrays!

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

More optimizations and better test coverage.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable Metadata

various cleanups

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

More optimizations

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

review changes

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

changes after review:
 + less usage of Mutable
 + more usage of EMPTY
 + restored fragment handling

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

changes after review:
 + less usage of Mutable
 + less usage of asImmutable

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

changes after review:
 + less usage of Mutable

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

changes after review:
 + better handling of URI in ContextHandler

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

changes after review:
 + downcast in test to access mutable response headers.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

changes after review:
 + use put instead of add for one time headers

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* private

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-04-28 13:36:44 +02:00
.github Fixing typo in stalebot message 2019-11-20 09:58:44 -06:00
advisories Adding reference to patched versions of jetty-http jars 2015-02-25 16:10:06 -07:00
aggregates Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
apache-jsp Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
apache-jstl Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
build-resources Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
examples Jetty 10.0.x use HandlerList instead of HandlerCollection (#4757) 2020-04-15 18:42:28 +02:00
jetty-alpn Jetty 10.0.x immutable meta data (#4777) 2020-04-28 13:36:44 +02:00
jetty-annotations Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
jetty-ant Jetty 10.0.x use HandlerList instead of HandlerCollection (#4757) 2020-04-15 18:42:28 +02:00
jetty-bom Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
jetty-cdi Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
jetty-client Jetty 10.0.x immutable meta data (#4777) 2020-04-28 13:36:44 +02:00
jetty-deploy Jetty 10.0.x use HandlerList instead of HandlerCollection (#4757) 2020-04-15 18:42:28 +02:00
jetty-distribution Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
jetty-documentation Jetty 10.0.x immutable meta data (#4777) 2020-04-28 13:36:44 +02:00
jetty-fcgi Jetty 10.0.x immutable meta data (#4777) 2020-04-28 13:36:44 +02:00
jetty-gcloud Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
jetty-hazelcast Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
jetty-home Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
jetty-http Jetty 10.0.x immutable meta data (#4777) 2020-04-28 13:36:44 +02:00
jetty-http-spi Jetty 10.0.x use HandlerList instead of HandlerCollection (#4757) 2020-04-15 18:42:28 +02:00
jetty-http2 Jetty 10.0.x immutable meta data (#4777) 2020-04-28 13:36:44 +02:00
jetty-infinispan Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
jetty-io Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
jetty-jaas Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
jetty-jaspi Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
jetty-jmh/src/main/java/org/eclipse/jetty/util Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
jetty-jmx Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
jetty-jndi Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
jetty-jspc-maven-plugin Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
jetty-maven-plugin Jetty 10.0.x use HandlerList instead of HandlerCollection (#4757) 2020-04-15 18:42:28 +02:00
jetty-memcached Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
jetty-nosql Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
jetty-openid Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-04-15 18:50:19 +02:00
jetty-osgi Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-04-28 11:40:20 +02:00
jetty-plus Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
jetty-proxy Jetty 10.0.x immutable meta data (#4777) 2020-04-28 13:36:44 +02:00
jetty-quickstart Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
jetty-rewrite Jetty 10.0.x immutable meta data (#4777) 2020-04-28 13:36:44 +02:00
jetty-runner Jetty 10.0.x use HandlerList instead of HandlerCollection (#4757) 2020-04-15 18:42:28 +02:00
jetty-security Jetty 10.0.x immutable meta data (#4777) 2020-04-28 13:36:44 +02:00
jetty-server Jetty 10.0.x immutable meta data (#4777) 2020-04-28 13:36:44 +02:00
jetty-servlet Jetty 10.0.x use HandlerList instead of HandlerCollection (#4757) 2020-04-15 18:42:28 +02:00
jetty-servlets Jetty 10.0.x immutable meta data (#4777) 2020-04-28 13:36:44 +02:00
jetty-slf4j-impl Issue #4683 Fix jetty-slf4j-impl for osgi (#4684) 2020-04-06 11:35:57 +02:00
jetty-spring Jetty 10.0.x use HandlerList instead of HandlerCollection (#4757) 2020-04-15 18:42:28 +02:00
jetty-start Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
jetty-unixsocket Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
jetty-util Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-04-28 10:29:41 +02:00
jetty-util-ajax Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
jetty-webapp Jetty 10.0.x use HandlerList instead of HandlerCollection (#4757) 2020-04-15 18:42:28 +02:00
jetty-websocket Jetty 10.0.x immutable meta data (#4777) 2020-04-28 13:36:44 +02:00
jetty-xml Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
logos Issue #4572 - Mechanical Change to use org.slf4j 2020-03-16 15:48:25 -05:00
scripts fix javadoc aggregate generation by using last maven javadoc plugin 3.2.0 (#4675) 2020-03-19 07:06:13 +10:00
tests Jetty 10.0.x immutable meta data (#4777) 2020-04-28 13:36:44 +02:00
.gitattributes Adding mod & adoc to gitattributes 2018-08-02 08:57:58 -05:00
.gitignore Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-9.4.x-3550-QueuedThreadPool-cleanup 2019-04-25 06:53:07 +02:00
CODE_COVERAGE.md http-spi test improvement (#62) 2016-05-04 10:56:56 +10:00
CONTRIBUTING.md Testing gpg signature setup 2019-09-25 12:42:32 -05:00
Jenkinsfile Jetty 10.0.x graphviz container (#4783) 2020-04-18 09:59:04 +10:00
Jmh_Jenkinsfile Merge branch 'jetty-9.4.x' into jetty-10.0.x 2019-07-09 12:57:26 +10:00
KEYS.txt Fixing typo in email address 2019-09-10 03:57:58 -05:00
LICENSE Issue #3578 - Adopt EPL-2.0 for Jetty-10. 2020-01-09 20:10:19 +01:00
NOTICE.txt Issue #3578 - Adopt EPL-2.0 for Jetty-10. 2020-01-09 20:10:19 +01:00
README.md Updating http to https 2019-11-05 16:23:49 -06:00
VERSION.txt Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-04-13 17:10:59 -05:00
header-template.txt Fixes #3578 - Adopt EPL-2.0 for Jetty-10. 2020-01-09 21:56:05 +01:00
pom.xml Merge branch 'jetty-9.4.x' into jetty-10.0.x 2020-04-22 15:14:43 +10:00

README.md

Eclipse Jetty Canonical Repository

This is the canonical repository for the Jetty project, feel free to fork and contribute now!

Submitting a patch or pull request?

Make sure you have an Eclipse Contributor Agreement (ECA) on file.

Project description

Jetty is a lightweight highly scalable java based web server and servlet engine. Our goal is to support web protocols like HTTP, HTTP/2 and WebSocket in a high volume low latency way that provides maximum performance while retaining the ease of use and compatibility with years of servlet development. Jetty is a modern fully async web server that has a long history as a component oriented technology easily embedded into applications while still offering a solid traditional distribution for webapp deployment.

Documentation

Project documentation is available on the Jetty Eclipse website.

Building

To build, use:

  mvn clean install

The Jetty distribution will be built in jetty-distribution/target/distribution.

The first build may take a longer than expected as Maven downloads all the dependencies.

The build tests do a lot of stress testing, and on some machines it is necessary to set the file descriptor limit to greater than 2048 for the tests to all pass successfully.

It is possible to bypass tests by building with mvn clean install -DskipTests.

Professional Services

Expert advice and production support are available through Webtide.com.