...
Attribute | Description |
---|---|
minThreads | Specifies the minimum number of threads available to the Jetty instance for processing requests. |
maxThreads | Specifies the maximum number of threads available to the Jetty instance for processing requests. |
Anchor | ||||
---|---|---|---|---|
|
If HttpServerEngineSupport#ENABLE_HTTP2 bus property is set, Jetty engine will enable the HTTP/2 support as well: HTTP/2 over cleartext (h2c) if TLS is not configured, regular HTTP/2 otherwise. It requires additional dependencies to be bundled by the application.
Code Block | ||||
---|---|---|---|---|
| ||||
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-server</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-server</artifactId>
<version>${jetty.version}</version>
</dependency> |
Additionally, for JDK8 you would need to include:
Code Block | ||||
---|---|---|---|---|
| ||||
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-openjdk8-server</artifactId>
<version>${jetty.version}</version>
</dependency> |
If you are using JDK9 and above, please use the following dependency instead:
Code Block | ||||
---|---|---|---|---|
| ||||
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-java-server</artifactId>
<version>${jetty.version}</version>
</dependency> |
Example
The example below shows a configuration fragment that configures a Jetty instance on port number 9001.
...