Merge pull request #8454 from eclipse/jetty-12.0.x-module-renaming

Jetty 12.0.x module renaming
This commit is contained in:
Simone Bordet 2022-08-12 17:32:31 +02:00 committed by GitHub
commit 602b07695a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
755 changed files with 466 additions and 666 deletions

View File

@ -198,23 +198,23 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.fcgi</groupId>
<artifactId>fcgi-client</artifactId>
<artifactId>jetty-fcgi-client</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-server</artifactId>
<artifactId>jetty-http2-server</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-http-client-transport</artifactId>
<artifactId>jetty-http2-client-transport</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http3</groupId>
<artifactId>http3-server</artifactId>
<artifactId>jetty-http3-server</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http3</groupId>
<artifactId>http3-http-client-transport</artifactId>
<artifactId>jetty-http3-client-transport</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>

View File

@ -31,7 +31,7 @@ The Maven artifact coordinates for the HTTP/2 client library are the following:
----
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-client</artifactId>
<artifactId>jetty-http2-client</artifactId>
<version>{version}</version>
</dependency>
----

View File

@ -31,7 +31,7 @@ The Maven artifact coordinates for the HTTP/3 client library are the following:
----
<dependency>
<groupId>org.eclipse.jetty.http3</groupId>
<artifactId>http3-client</artifactId>
<artifactId>jetty-http3-client</artifactId>
<version>{version}</version>
</dependency>
----

View File

@ -29,7 +29,7 @@ The Maven artifact coordinates for the HTTP/2 client library are the following:
----
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-server</artifactId>
<artifactId>jetty-http2-server</artifactId>
<version>{version}</version>
</dependency>
----

View File

@ -29,7 +29,7 @@ The Maven artifact coordinates for the HTTP/3 client library are the following:
----
<dependency>
<groupId>org.eclipse.jetty.http3</groupId>
<artifactId>http3-server</artifactId>
<artifactId>jetty-http3-server</artifactId>
<version>{version}</version>
</dependency>
----

View File

@ -60,10 +60,10 @@ import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.http2.client.HTTP2Client;
import org.eclipse.jetty.http2.client.http.ClientConnectionFactoryOverHTTP2;
import org.eclipse.jetty.http2.client.http.HttpClientTransportOverHTTP2;
import org.eclipse.jetty.http2.client.transport.ClientConnectionFactoryOverHTTP2;
import org.eclipse.jetty.http2.client.transport.HttpClientTransportOverHTTP2;
import org.eclipse.jetty.http3.client.HTTP3Client;
import org.eclipse.jetty.http3.client.http.HttpClientTransportOverHTTP3;
import org.eclipse.jetty.http3.client.transport.HttpClientTransportOverHTTP3;
import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.ClientConnectionFactory;
import org.eclipse.jetty.io.ClientConnector;

View File

@ -27,8 +27,8 @@ import org.eclipse.jetty.ee10.websocket.client.ClientUpgradeRequest;
import org.eclipse.jetty.ee10.websocket.client.JettyUpgradeListener;
import org.eclipse.jetty.ee10.websocket.client.WebSocketClient;
import org.eclipse.jetty.http2.client.HTTP2Client;
import org.eclipse.jetty.http2.client.http.ClientConnectionFactoryOverHTTP2;
import org.eclipse.jetty.http2.client.http.HttpClientTransportOverHTTP2;
import org.eclipse.jetty.http2.client.transport.ClientConnectionFactoryOverHTTP2;
import org.eclipse.jetty.http2.client.transport.HttpClientTransportOverHTTP2;
import org.eclipse.jetty.util.component.LifeCycle;
@SuppressWarnings("unused")

View File

@ -36,9 +36,6 @@ import org.eclipse.jetty.util.thread.SerializedInvoker;
@SuppressWarnings("unused")
public class HandlerDocs
{
// TODO this class has been temporarily moved to jetty-core/jetty-demo
// move it back when documentation is re-enabled
public static class HelloHandler0 extends Handler.Abstract
{
@Override

View File

@ -135,17 +135,7 @@
<doctitle>Eclipse Jetty API Doc - v${project.version}</doctitle>
<windowtitle>Eclipse Jetty API Doc - v${project.version}</windowtitle>
<excludePackageNames>
org.eclipse.jetty.http3.client.http.internal;
org.eclipse.jetty.http3.client.internal;
org.eclipse.jetty.http3.internal;
org.eclipse.jetty.http3.internal.*;
org.eclipse.jetty.http3.qpack.internal;
org.eclipse.jetty.http3.qpack.internal.*;
org.eclipse.jetty.http3.server.internal;
org.eclipse.jetty.quic.common.internal;
org.eclipse.jetty.quic.quiche;
org.eclipse.jetty.quic.quiche.*;
org.eclipse.jetty.quic.server.internal;
org.eclipse.jetty.http3.client.transport.internal; org.eclipse.jetty.http3.client.internal; org.eclipse.jetty.http3.internal; org.eclipse.jetty.http3.internal.*; org.eclipse.jetty.http3.qpack.internal; org.eclipse.jetty.http3.qpack.internal.*; org.eclipse.jetty.http3.server.internal; org.eclipse.jetty.quic.common.internal; org.eclipse.jetty.quic.quiche; org.eclipse.jetty.quic.quiche.*; org.eclipse.jetty.quic.server.internal;
</excludePackageNames>
</configuration>
</execution>
@ -217,12 +207,12 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.fcgi</groupId>
<artifactId>fcgi-client</artifactId>
<artifactId>jetty-fcgi-client</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.fcgi</groupId>
<artifactId>fcgi-server</artifactId>
<artifactId>jetty-fcgi-server</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
@ -237,32 +227,32 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-client</artifactId>
<artifactId>jetty-http2-client</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-http-client-transport</artifactId>
<artifactId>jetty-http2-client-transport</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-server</artifactId>
<artifactId>jetty-http2-server</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http3</groupId>
<artifactId>http3-client</artifactId>
<artifactId>jetty-http3-client</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http3</groupId>
<artifactId>http3-http-client-transport</artifactId>
<artifactId>jetty-http3-client-transport</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http3</groupId>
<artifactId>http3-server</artifactId>
<artifactId>jetty-http3-server</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
@ -297,12 +287,12 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.quic</groupId>
<artifactId>quic-client</artifactId>
<artifactId>jetty-quic-client</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.quic</groupId>
<artifactId>quic-server</artifactId>
<artifactId>jetty-quic-server</artifactId>
<scope>provided</scope>
</dependency>
<dependency>

View File

@ -117,12 +117,12 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.fcgi</groupId>
<artifactId>fcgi-client</artifactId>
<artifactId>jetty-fcgi-client</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.fcgi</groupId>
<artifactId>fcgi-server</artifactId>
<artifactId>jetty-fcgi-server</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
@ -149,52 +149,52 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-client</artifactId>
<artifactId>jetty-http2-client</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-common</artifactId>
<artifactId>jetty-http2-common</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-hpack</artifactId>
<artifactId>jetty-http2-hpack</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-http-client-transport</artifactId>
<artifactId>jetty-http2-client-transport</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-server</artifactId>
<artifactId>jetty-http2-server</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http3</groupId>
<artifactId>http3-client</artifactId>
<artifactId>jetty-http3-client</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http3</groupId>
<artifactId>http3-common</artifactId>
<artifactId>jetty-http3-common</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http3</groupId>
<artifactId>http3-http-client-transport</artifactId>
<artifactId>jetty-http3-client-transport</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http3</groupId>
<artifactId>http3-qpack</artifactId>
<artifactId>jetty-http3-qpack</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http3</groupId>
<artifactId>http3-server</artifactId>
<artifactId>jetty-http3-server</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
@ -294,27 +294,27 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.quic</groupId>
<artifactId>quic-client</artifactId>
<artifactId>jetty-quic-client</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.quic</groupId>
<artifactId>quic-common</artifactId>
<artifactId>jetty-quic-common</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.quic</groupId>
<artifactId>quic-quiche-common</artifactId>
<artifactId>jetty-quic-quiche-common</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.quic</groupId>
<artifactId>quic-quiche-jna</artifactId>
<artifactId>jetty-quic-quiche-jna</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.quic</groupId>
<artifactId>quic-server</artifactId>
<artifactId>jetty-quic-server</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
@ -449,17 +449,17 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-core-common</artifactId>
<artifactId>jetty-websocket-core-common</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-core-client</artifactId>
<artifactId>jetty-websocket-core-client</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-core-server</artifactId>
<artifactId>jetty-websocket-core-server</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
@ -480,7 +480,7 @@
<dependencies>
<dependency>
<groupId>org.eclipse.jetty.quic</groupId>
<artifactId>quic-quiche-foreign-incubator</artifactId>
<artifactId>jetty-quic-quiche-foreign-incubator</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
</dependencies>

View File

@ -30,7 +30,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-client</artifactId>
<artifactId>jetty-http2-client</artifactId>
<scope>test</scope>
</dependency>
<dependency>

View File

@ -38,7 +38,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-server</artifactId>
<artifactId>jetty-http2-server</artifactId>
<scope>test</scope>
</dependency>
<dependency>
@ -53,12 +53,12 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-client</artifactId>
<artifactId>jetty-http2-client</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-http-client-transport</artifactId>
<artifactId>jetty-http2-client-transport</artifactId>
<scope>test</scope>
</dependency>

View File

@ -23,7 +23,7 @@ import org.eclipse.jetty.alpn.server.ALPNServerConnectionFactory;
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.client.api.ContentResponse;
import org.eclipse.jetty.http2.client.HTTP2Client;
import org.eclipse.jetty.http2.client.http.HttpClientTransportOverHTTP2;
import org.eclipse.jetty.http2.client.transport.HttpClientTransportOverHTTP2;
import org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory;
import org.eclipse.jetty.io.ClientConnector;
import org.eclipse.jetty.server.Handler;

View File

@ -46,7 +46,7 @@
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-client</artifactId>
<artifactId>jetty-http2-client</artifactId>
<scope>test</scope>
</dependency>
<dependency>

View File

@ -60,7 +60,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-server</artifactId>
<artifactId>jetty-http2-server</artifactId>
<scope>test</scope>
</dependency>
<dependency>

View File

@ -97,12 +97,12 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.fcgi</groupId>
<artifactId>fcgi-client</artifactId>
<artifactId>jetty-fcgi-client</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.fcgi</groupId>
<artifactId>fcgi-server</artifactId>
<artifactId>jetty-fcgi-server</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
@ -129,52 +129,52 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-client</artifactId>
<artifactId>jetty-http2-client</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-common</artifactId>
<artifactId>jetty-http2-common</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-hpack</artifactId>
<artifactId>jetty-http2-hpack</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-http-client-transport</artifactId>
<artifactId>jetty-http2-client-transport</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-server</artifactId>
<artifactId>jetty-http2-server</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http3</groupId>
<artifactId>http3-client</artifactId>
<artifactId>jetty-http3-client</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http3</groupId>
<artifactId>http3-common</artifactId>
<artifactId>jetty-http3-common</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http3</groupId>
<artifactId>http3-http-client-transport</artifactId>
<artifactId>jetty-http3-client-transport</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http3</groupId>
<artifactId>http3-qpack</artifactId>
<artifactId>jetty-http3-qpack</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http3</groupId>
<artifactId>http3-server</artifactId>
<artifactId>jetty-http3-server</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
@ -244,27 +244,27 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.quic</groupId>
<artifactId>quic-client</artifactId>
<artifactId>jetty-quic-client</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.quic</groupId>
<artifactId>quic-common</artifactId>
<artifactId>jetty-quic-common</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.quic</groupId>
<artifactId>quic-quiche-common</artifactId>
<artifactId>jetty-quic-quiche-common</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.quic</groupId>
<artifactId>quic-quiche-jna</artifactId>
<artifactId>jetty-quic-quiche-jna</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.quic</groupId>
<artifactId>quic-server</artifactId>
<artifactId>jetty-quic-server</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
@ -315,17 +315,17 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-core-common</artifactId>
<artifactId>jetty-websocket-core-common</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-core-client</artifactId>
<artifactId>jetty-websocket-core-client</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-core-server</artifactId>
<artifactId>jetty-websocket-core-server</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
<dependency>
@ -346,7 +346,7 @@
<dependencies>
<dependency>
<groupId>org.eclipse.jetty.quic</groupId>
<artifactId>quic-quiche-foreign-incubator</artifactId>
<artifactId>jetty-quic-quiche-foreign-incubator</artifactId>
<version>12.0.0-SNAPSHOT</version>
</dependency>
</dependencies>

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
<!-- ==================================================================
Configure and deploy the test web application
===================================================================== -->
<Configure id="coreDemo" class="org.eclipse.jetty.server.handler.ContextHandler">
<Set name="handler">
<New class="org.eclipse.jetty.core.demo.HandlerDocs$RootHandler">
<Call name="addHandler"><Arg><New class="org.eclipse.jetty.core.demo.HandlerDocs$HelloHandler0"/></Arg></Call>
<Call name="addHandler"><Arg><New class="org.eclipse.jetty.core.demo.HandlerDocs$HelloHandler1"/></Arg></Call>
<Call name="addHandler"><Arg><New class="org.eclipse.jetty.core.demo.HandlerDocs$HelloHandler2"/></Arg></Call>
<Call name="addHandler"><Arg><New class="org.eclipse.jetty.core.demo.HandlerDocs$HelloHandler3"/></Arg></Call>
<Call name="addHandler"><Arg><New class="org.eclipse.jetty.core.demo.HandlerDocs$HelloHandler4"/></Arg></Call>
<Call name="addHandler"><Arg><New class="org.eclipse.jetty.core.demo.HandlerDocs$HelloHandler5"/></Arg></Call>
<Call name="addHandler"><Arg><New class="org.eclipse.jetty.core.demo.HandlerDocs$EchoHandler"/></Arg></Call>
</New>
</Set>
</Configure>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
<Configure id="helloDemo" class="org.eclipse.jetty.server.handler.ContextHandler">
<Set name="handler">
<New class="org.eclipse.jetty.demo.HelloHandler" />
</Set>
</Configure>

View File

@ -1,208 +0,0 @@
//
// ========================================================================
// Copyright (c) 1995-2022 Mort Bay Consulting Pty Ltd and others.
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License v. 2.0 which is available at
// https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
// which is available at https://www.apache.org/licenses/LICENSE-2.0.
//
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
// ========================================================================
//
package org.eclipse.jetty.core.demo;
import java.io.IOException;
import java.io.PrintStream;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.concurrent.Flow;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.MimeTypes;
import org.eclipse.jetty.io.Content;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.Response;
import org.eclipse.jetty.util.Blocker;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.URIUtil;
import org.eclipse.jetty.util.thread.SerializedInvoker;
public class HandlerDocs
{
public static class HelloHandler0 extends Handler.Abstract
{
@Override
public Request.Processor handle(Request request) throws Exception
{
return (req, response, callback) ->
{
response.setStatus(200);
response.getHeaders().add(HttpHeader.CONTENT_TYPE, "text/plain");
response.write(true, BufferUtil.toBuffer("Hello World\n"), callback);
};
}
}
public static class HelloHandler1 extends Handler.Abstract
{
@Override
public Request.Processor handle(Request request) throws Exception
{
return this::process;
}
private void process(Request request, Response response, Callback callback)
{
response.setStatus(200);
response.getHeaders().add(HttpHeader.CONTENT_TYPE, "text/plain");
Content.Sink.write(response, true, "Hello World", callback);
}
}
public static class HelloHandler2 extends Handler.Processor.NonBlocking
{
@Override
public void process(Request request, Response response, Callback callback)
{
response.setStatus(200);
response.getHeaders().add(HttpHeader.CONTENT_TYPE, "text/plain");
response.write(true, BufferUtil.toBuffer("Hello World\n"), callback);
}
}
public static class HelloHandler3 extends Handler.Processor.Blocking
{
@Override
public void process(Request request, Response response, Callback callback) throws IOException
{
response.setStatus(200);
response.getHeaders().add(HttpHeader.CONTENT_TYPE, "text/plain");
try (Blocker.Callback blocker = Blocker.callback())
{
response.write(false, BufferUtil.toBuffer("Hello "), blocker);
blocker.block();
}
Content.Sink.write(response, true, BufferUtil.toBuffer("World\n"));
callback.succeeded();
}
}
public static class HelloHandler4 extends Handler.Processor.Blocking
{
@Override
public void process(Request request, Response response, Callback callback) throws IOException
{
response.setStatus(200);
response.getHeaders().add(HttpHeader.CONTENT_TYPE, "text/plain");
try (PrintStream out = new PrintStream(Content.Sink.asOutputStream(response)))
{
out.print("Hello ");
out.println("World");
callback.succeeded();
}
catch (Throwable t)
{
callback.failed(t);
}
}
}
public static class HelloHandler5 extends Handler.Processor.NonBlocking
{
@Override
public void process(Request request, Response response, Callback callback) throws IOException
{
response.setStatus(200);
response.getHeaders().add(HttpHeader.CONTENT_TYPE, "text/plain");
new HelloWorldPublisher().subscribe(Content.Sink.asSubscriber(response, callback));
}
}
public static class HelloWorldPublisher implements Flow.Publisher<Content.Chunk>
{
@Override
public void subscribe(Flow.Subscriber<? super Content.Chunk> subscriber)
{
final SerializedInvoker invoker = new SerializedInvoker();
final Queue<Content.Chunk> chunks = new LinkedList<>(List.of(
Content.Chunk.from(BufferUtil.toBuffer("Hello "), false),
Content.Chunk.from(BufferUtil.toBuffer("World "), false),
Content.Chunk.EOF));
subscriber.onSubscribe(new Flow.Subscription()
{
@Override
public void request(long n)
{
while (n-- > 0 && !chunks.isEmpty())
invoker.run(() -> subscriber.onNext(chunks.poll()));
}
@Override
public void cancel()
{
subscriber.onNext(Content.Chunk.from(new IOException("Cancelled")));
}
});
}
}
public static class EchoHandler extends Handler.Processor.NonBlocking
{
@Override
public void process(Request request, Response response, Callback callback)
{
response.setStatus(200);
response.getHeaders().put(HttpHeader.CONTENT_TYPE, request.getHeaders().get(HttpHeader.CONTENT_TYPE));
long contentLength = request.getHeaders().getLongField(HttpHeader.CONTENT_LENGTH);
if (contentLength >= 0)
response.getHeaders().putLongField(HttpHeader.CONTENT_LENGTH, contentLength);
Content.copy(request, response, callback);
}
}
public static class RootHandler extends Handler.Collection
{
@Override
public Request.Processor handle(Request request) throws Exception
{
final StringBuilder index = new StringBuilder();
index.append("<h2>Handler Demos</h2>\n<ul>\n");
for (Handler handler : getHandlers())
{
String name = handler.getClass().getSimpleName().replace("Handler", "");
String path = "/" + name;
if (request.getPathInContext().equals(path))
{
Request.Processor processor = handler.handle(request);
if (processor != null)
return processor;
}
index.append("<li><a href=\"")
.append(URIUtil.addPaths(request.getContext().getContextPath(), path))
.append("\">")
.append(name)
.append("</a></li>\n");
}
index.append("</ul>");
return (req, res, callback) ->
{
res.setStatus(200);
res.getHeaders().add(HttpHeader.CONTENT_TYPE, MimeTypes.Type.TEXT_HTML_UTF_8.asString());
Content.Sink.write(res, true, index.toString(), callback);
};
}
}
}

View File

@ -0,0 +1,33 @@
//
// ========================================================================
// Copyright (c) 1995-2022 Mort Bay Consulting Pty Ltd and others.
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License v. 2.0 which is available at
// https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
// which is available at https://www.apache.org/licenses/LICENSE-2.0.
//
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
// ========================================================================
//
package org.eclipse.jetty.demo;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.util.BufferUtil;
public class HelloHandler extends Handler.Abstract
{
@Override
public Request.Processor handle(Request req)
{
return (request, response, callback) ->
{
response.setStatus(200);
response.getHeaders().add(HttpHeader.CONTENT_TYPE, "text/plain");
response.write(true, BufferUtil.toBuffer("Hello World\n"), callback);
};
}
}

View File

@ -2,12 +2,12 @@
<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.fcgi</groupId>
<artifactId>fcgi</artifactId>
<artifactId>jetty-fcgi</artifactId>
<version>12.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>fcgi-client</artifactId>
<artifactId>jetty-fcgi-client</artifactId>
<name>Jetty Core :: FastCGI :: Client</name>
<properties>

View File

@ -2,12 +2,12 @@
<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/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.eclipse.jetty.fcgi</groupId>
<artifactId>fcgi</artifactId>
<artifactId>jetty-fcgi</artifactId>
<version>12.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>fcgi-server</artifactId>
<artifactId>jetty-fcgi-server</artifactId>
<name>Jetty Core :: FastCGI :: Server</name>
<properties>
@ -26,7 +26,7 @@
</dependency>-->
<dependency>
<groupId>org.eclipse.jetty.fcgi</groupId>
<artifactId>fcgi-client</artifactId>
<artifactId>jetty-fcgi-client</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
@ -39,7 +39,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-server</artifactId>
<artifactId>jetty-http2-server</artifactId>
<scope>test</scope>
</dependency>
<dependency>

View File

@ -8,13 +8,13 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.jetty.fcgi</groupId>
<artifactId>fcgi</artifactId>
<artifactId>jetty-fcgi</artifactId>
<packaging>pom</packaging>
<name>Jetty Core :: FastCGI :: Parent</name>
<name>Jetty Core :: FastCGI</name>
<modules>
<module>fcgi-client</module>
<module>fcgi-server</module>
<module>jetty-fcgi-client</module>
<module>jetty-fcgi-server</module>
</modules>
<dependencies>

View File

@ -2,13 +2,13 @@
<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/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2</artifactId>
<artifactId>jetty-http2</artifactId>
<version>12.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>http2-http-client-transport</artifactId>
<name>Jetty Core :: HTTP2 :: HTTP Client Transport</name>
<artifactId>jetty-http2-client-transport</artifactId>
<name>Jetty Core :: HTTP2 :: Client Transport</name>
<properties>
<bundle-symbolic-name>${project.groupId}.client.http</bundle-symbolic-name>
@ -21,7 +21,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-client</artifactId>
<artifactId>jetty-http2-client</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>

View File

@ -19,5 +19,5 @@ module org.eclipse.jetty.http2.http.client.transport
requires transitive org.eclipse.jetty.client;
requires transitive org.eclipse.jetty.http2.client;
exports org.eclipse.jetty.http2.client.http;
exports org.eclipse.jetty.http2.client.transport;
}

View File

@ -11,7 +11,7 @@
// ========================================================================
//
package org.eclipse.jetty.http2.client.http;
package org.eclipse.jetty.http2.client.transport;
import java.io.IOException;
import java.io.UncheckedIOException;
@ -25,8 +25,8 @@ import org.eclipse.jetty.client.dynamic.HttpClientTransportDynamic;
import org.eclipse.jetty.client.http.HttpClientConnectionFactory;
import org.eclipse.jetty.http2.client.HTTP2Client;
import org.eclipse.jetty.http2.client.HTTP2ClientConnectionFactory;
import org.eclipse.jetty.http2.client.http.internal.HTTPSessionListenerPromise;
import org.eclipse.jetty.http2.client.http.internal.HttpConnectionOverHTTP2;
import org.eclipse.jetty.http2.client.transport.internal.HTTPSessionListenerPromise;
import org.eclipse.jetty.http2.client.transport.internal.HttpConnectionOverHTTP2;
import org.eclipse.jetty.io.ClientConnectionFactory;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.ssl.SslClientConnectionFactory;

View File

@ -11,7 +11,7 @@
// ========================================================================
//
package org.eclipse.jetty.http2.client.http;
package org.eclipse.jetty.http2.client.transport;
import java.io.IOException;
import java.net.InetSocketAddress;
@ -33,8 +33,8 @@ import org.eclipse.jetty.http.HttpScheme;
import org.eclipse.jetty.http2.api.Session;
import org.eclipse.jetty.http2.client.HTTP2Client;
import org.eclipse.jetty.http2.client.HTTP2ClientConnectionFactory;
import org.eclipse.jetty.http2.client.http.internal.HTTPSessionListenerPromise;
import org.eclipse.jetty.http2.client.http.internal.HttpConnectionOverHTTP2;
import org.eclipse.jetty.http2.client.transport.internal.HTTPSessionListenerPromise;
import org.eclipse.jetty.http2.client.transport.internal.HttpConnectionOverHTTP2;
import org.eclipse.jetty.http2.frames.GoAwayFrame;
import org.eclipse.jetty.io.ClientConnectionFactory;
import org.eclipse.jetty.io.EndPoint;

View File

@ -11,7 +11,7 @@
// ========================================================================
//
package org.eclipse.jetty.http2.client.http.internal;
package org.eclipse.jetty.http2.client.transport.internal;
import org.eclipse.jetty.http2.internal.HTTP2Channel;
import org.eclipse.jetty.http2.internal.HTTP2Stream;

View File

@ -11,7 +11,7 @@
// ========================================================================
//
package org.eclipse.jetty.http2.client.http.internal;
package org.eclipse.jetty.http2.client.transport.internal;
import java.nio.channels.ClosedChannelException;
import java.util.Map;

View File

@ -11,7 +11,7 @@
// ========================================================================
//
package org.eclipse.jetty.http2.client.http.internal;
package org.eclipse.jetty.http2.client.transport.internal;
import org.eclipse.jetty.client.HttpChannel;
import org.eclipse.jetty.client.HttpDestination;

View File

@ -11,7 +11,7 @@
// ========================================================================
//
package org.eclipse.jetty.http2.client.http.internal;
package org.eclipse.jetty.http2.client.transport.internal;
import java.nio.channels.AsynchronousCloseException;
import java.util.Iterator;

View File

@ -11,7 +11,7 @@
// ========================================================================
//
package org.eclipse.jetty.http2.client.http.internal;
package org.eclipse.jetty.http2.client.transport.internal;
import java.io.IOException;
import java.nio.ByteBuffer;

View File

@ -11,7 +11,7 @@
// ========================================================================
//
package org.eclipse.jetty.http2.client.http.internal;
package org.eclipse.jetty.http2.client.transport.internal;
import java.nio.ByteBuffer;
import java.util.function.Supplier;

View File

@ -2,12 +2,12 @@
<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/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2</artifactId>
<artifactId>jetty-http2</artifactId>
<version>12.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>http2-client</artifactId>
<artifactId>jetty-http2-client</artifactId>
<name>Jetty Core :: HTTP2 :: Client</name>
<properties>
@ -31,7 +31,7 @@
<dependencies>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-common</artifactId>
<artifactId>jetty-http2-common</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>

View File

@ -2,12 +2,12 @@
<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.http2</groupId>
<artifactId>http2</artifactId>
<artifactId>jetty-http2</artifactId>
<version>12.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>http2-common</artifactId>
<artifactId>jetty-http2-common</artifactId>
<name>Jetty Core :: HTTP2 :: Common</name>
<properties>
@ -17,7 +17,7 @@
<dependencies>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-hpack</artifactId>
<artifactId>jetty-http2-hpack</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>

Some files were not shown because too many files have changed in this diff Show More