diff --git a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/client-io-arch.adoc b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/client-io-arch.adoc
index 2cb4a8a9aa0b..ee2d930f3e1f 100644
--- a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/client-io-arch.adoc
+++ b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/client-io-arch.adoc
@@ -43,13 +43,13 @@ The Jetty client libraries use the common I/O design described in xref:pg-arch-i
The common I/O components and concepts are used for all low-level transports.
The only partial exception is the xref:pg-client-io-arch-memory[memory transport], which is not based on network components; as such it does not need a `SelectorManager`, but it exposes `EndPoint` so that high-level protocols have a common interface to interact with the low-level transport.
-The client-side abstraction for the low-level transport is `org.eclipse.jetty.io.TransportProtocol`.
+The client-side abstraction for the low-level transport is `org.eclipse.jetty.io.Transport`.
-`TransportProtocol` represents how high-level protocols can be transported; there is `TransportProtocol.TCP_IP` that represents communication over TCP, but also `TransportProtocol.TCPUnix` for Unix-Domain sockets, `QuicTransportProtocol` for QUIC and `MemoryTransportProtocol` for memory.
+`Transport` represents how high-level protocols can be transported; there is `Transport.TCP_IP` that represents communication over TCP, but also `Transport.TCPUnix` for Unix-Domain sockets, `QuicTransport` for QUIC and `MemoryTransport` for memory.
-Applications can specify the `TransportProtocol` to use for each request as described in xref:pg-client-http-api-protocol[this section].
+Applications can specify the `Transport` to use for each request as described in xref:pg-client-http-api-protocol[this section].
-When the `TransportProtocol` implementation uses the network, it delegates to `org.eclipse.jetty.io.ClientConnector`.
+When the `Transport` implementation uses the network, it delegates to `org.eclipse.jetty.io.ClientConnector`.
`ClientConnector` primarily wraps `org.eclipse.jetty.io.SelectorManager` to provide network functionalities, and aggregates other four components:
@@ -109,7 +109,7 @@ link:https://openjdk.java.net/jeps/380[JEP 380] introduced Unix-Domain sockets s
`ClientConnector` handles Unix-Domain sockets exactly like it handles regular TCP sockets, so there is no additional configuration necessary -- Unix-Domain sockets are supported out-of-the-box.
-Applications can specify the `TransportProtocol` to use for each request as described in xref:pg-client-http-api-protocol[this section].
+Applications can specify the `Transport` to use for each request as described in xref:pg-client-http-api-protocol[this section].
[[pg-client-io-arch-memory]]
===== Memory Support
@@ -117,9 +117,9 @@ Applications can specify the `TransportProtocol` to use for each request as desc
In addition to support communication between client and server via network or Unix-Domain, the Jetty client libraries also support communication between client and server via memory for intra-process communication.
This means that the client and server must be in the same JVM process.
-This functionality is provided by `org.eclipse.jetty.server.MemoryTransportProtocol`, which does not delegate to `ClientConnector`, but instead delegates to the server-side `MemoryConnector` and its related classes.
+This functionality is provided by `org.eclipse.jetty.server.MemoryTransport`, which does not delegate to `ClientConnector`, but instead delegates to the server-side `MemoryConnector` and its related classes.
-Applications can specify the `TransportProtocol` to use for each request as described in xref:pg-client-http-api-protocol[this section].
+Applications can specify the `Transport` to use for each request as described in xref:pg-client-http-api-protocol[this section].
[[pg-client-io-arch-protocol]]
==== Protocol Layer
@@ -132,7 +132,7 @@ On the client side, a `ClientConnectionFactory` implementation is the component
Applications may use `ClientConnector.connect(SocketAddress, Map)` to establish a TCP connection to the server, and must provide `ClientConnector` with the following information in the context map:
-* A `TransportProtocol` instance that specifies the low-level transport to use.
+* A `Transport` instance that specifies the low-level transport to use.
* A `ClientConnectionFactory` that creates `Connection` instances for the high-level protocol.
* A `Promise` that is notified when the connection creation succeeds or fails.
diff --git a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http/client-http-api.adoc b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http/client-http-api.adoc
index 395e45751f39..56513dc3ec7e 100644
--- a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http/client-http-api.adoc
+++ b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http/client-http-api.adoc
@@ -272,7 +272,7 @@ include::../../{doc_code}/org/eclipse/jetty/docs/programming/client/http/HTTPCli
----
[[pg-client-http-api-protocol]]
-===== Request `TransportProtocol`
+===== Request `Transport`
The communication between client and server happens over a xref:pg-client-io-arch-transport[low-level transport], and applications can specify the low-level transport to use for each request.
@@ -298,5 +298,5 @@ This is a fancy example of how to mix HTTP versions and low-level transports:
[source,java,indent=0]
----
-include::../../{doc_code}/org/eclipse/jetty/docs/programming/client/http/HTTPClientDocs.java[tag=mixedTransportProtocols]
+include::../../{doc_code}/org/eclipse/jetty/docs/programming/client/http/HTTPClientDocs.java[tag=mixedTransports]
----
diff --git a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http/client-http-intro.adoc b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http/client-http-intro.adoc
index dfc24643ae0e..fb4840dff7a6 100644
--- a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http/client-http-intro.adoc
+++ b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http/client-http-intro.adoc
@@ -131,7 +131,7 @@ A connection may start by speaking one protocol, for example HTTP/1.1, but then
Two origins with the same `(scheme, host, port, tag)` but different `protocol` create two different destinations and therefore two different connection pools.
-Finally, it is possible for a server to speak the same protocol over different xref:pg-client-io-arch-transport[low-level transports] (represented by `TransportProtocol`), for example TCP and Unix-Domain.
+Finally, it is possible for a server to speak the same protocol over different xref:pg-client-io-arch-transport[low-level transports] (represented by `Transport`), for example TCP and Unix-Domain.
Two origins with the same `(scheme, host, port, tag, protocol)` but different low-level transports create two different destinations and therefore two different connection pools.
diff --git a/documentation/jetty-documentation/src/main/java/org/eclipse/jetty/docs/programming/client/ClientConnectorDocs.java b/documentation/jetty-documentation/src/main/java/org/eclipse/jetty/docs/programming/client/ClientConnectorDocs.java
index 8f29d16780da..d621cc99f6eb 100644
--- a/documentation/jetty-documentation/src/main/java/org/eclipse/jetty/docs/programming/client/ClientConnectorDocs.java
+++ b/documentation/jetty-documentation/src/main/java/org/eclipse/jetty/docs/programming/client/ClientConnectorDocs.java
@@ -30,7 +30,7 @@
import org.eclipse.jetty.io.ClientConnector;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.SelectorManager;
-import org.eclipse.jetty.io.TransportProtocol;
+import org.eclipse.jetty.io.Transport;
import org.eclipse.jetty.io.ssl.SslClientConnectionFactory;
import org.eclipse.jetty.io.ssl.SslConnection;
import org.eclipse.jetty.util.BufferUtil;
@@ -143,8 +143,8 @@ public void onFillable()
int port = 8080;
SocketAddress address = new InetSocketAddress(host, port);
- // The TransportProtocol instance.
- TransportProtocol transportProtocol = TransportProtocol.TCP_IP;
+ // The Transport instance.
+ Transport transport = Transport.TCP_IP;
// The ClientConnectionFactory that creates CustomConnection instances.
ClientConnectionFactory connectionFactory = (endPoint, context) ->
@@ -158,7 +158,7 @@ public void onFillable()
// Populate the context with the mandatory keys to create and obtain connections.
Map context = new ConcurrentHashMap<>();
- context.put(TransportProtocol.class.getName(), transportProtocol);
+ context.put(Transport.class.getName(), transport);
context.put(ClientConnector.CLIENT_CONNECTION_FACTORY_CONTEXT_KEY, connectionFactory);
context.put(ClientConnector.CONNECTION_PROMISE_CONTEXT_KEY, connectionPromise);
clientConnector.connect(address, context);
@@ -272,7 +272,7 @@ public void writeLine(String line, Callback callback)
CompletableFuture connectionPromise = new Promise.Completable<>();
Map context = new HashMap<>();
- context.put(TransportProtocol.class.getName(), TransportProtocol.TCP_IP);
+ context.put(Transport.class.getName(), Transport.TCP_IP);
context.put(ClientConnector.CLIENT_CONNECTION_FACTORY_CONTEXT_KEY, connectionFactory);
context.put(ClientConnector.CONNECTION_PROMISE_CONTEXT_KEY, connectionPromise);
clientConnector.connect(address, context);
@@ -397,7 +397,7 @@ public void writeLine(String line, Callback callback)
CompletableFuture connectionPromise = new Promise.Completable<>();
Map context = new ConcurrentHashMap<>();
- context.put(TransportProtocol.class.getName(), TransportProtocol.TCP_IP);
+ context.put(Transport.class.getName(), Transport.TCP_IP);
context.put(ClientConnector.CLIENT_CONNECTION_FACTORY_CONTEXT_KEY, connectionFactory);
context.put(ClientConnector.CONNECTION_PROMISE_CONTEXT_KEY, connectionPromise);
clientConnector.connect(address, context);
diff --git a/documentation/jetty-documentation/src/main/java/org/eclipse/jetty/docs/programming/client/http/HTTPClientDocs.java b/documentation/jetty-documentation/src/main/java/org/eclipse/jetty/docs/programming/client/http/HTTPClientDocs.java
index 5610aa7764f1..816c4f3427f1 100644
--- a/documentation/jetty-documentation/src/main/java/org/eclipse/jetty/docs/programming/client/http/HTTPClientDocs.java
+++ b/documentation/jetty-documentation/src/main/java/org/eclipse/jetty/docs/programming/client/http/HTTPClientDocs.java
@@ -72,12 +72,12 @@
import org.eclipse.jetty.io.ClientConnectionFactory;
import org.eclipse.jetty.io.ClientConnector;
import org.eclipse.jetty.io.Content;
-import org.eclipse.jetty.io.TransportProtocol;
+import org.eclipse.jetty.io.Transport;
import org.eclipse.jetty.io.ssl.SslHandshakeListener;
import org.eclipse.jetty.quic.client.ClientQuicConfiguration;
import org.eclipse.jetty.server.HttpConnectionFactory;
import org.eclipse.jetty.server.MemoryConnector;
-import org.eclipse.jetty.server.MemoryTransportProtocol;
+import org.eclipse.jetty.server.MemoryTransport;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.component.LifeCycle;
@@ -1160,7 +1160,7 @@ public void unixDomain() throws Exception
ContentResponse response = httpClient.newRequest("jetty.org", 80)
// Specify that the request must be sent over Unix-Domain.
- .transportProtocol(new TransportProtocol.TCPUnix(unixDomainPath))
+ .transport(new Transport.TCPUnix(unixDomainPath))
.send();
// end::unixDomain[]
}
@@ -1181,17 +1181,17 @@ public void memory() throws Exception
HttpClient httpClient = new HttpClient();
httpClient.start();
- // Use the MemoryTransportProtocol to communicate with the server-side.
- TransportProtocol transportProtocol = new MemoryTransportProtocol(memoryConnector);
+ // Use the MemoryTransport to communicate with the server-side.
+ Transport transport = new MemoryTransport(memoryConnector);
httpClient.newRequest("http://localhost/")
- // Specify the TransportProtocol to use.
- .transportProtocol(transportProtocol)
+ // Specify the Transport to use.
+ .transport(transport)
.send();
// end::memory[]
}
- public void mixedTransportProtocols() throws Exception
+ public void mixedTransports() throws Exception
{
Path unixDomainPath = Path.of("/path/to/server.sock");
@@ -1212,19 +1212,19 @@ public void mixedTransportProtocols() throws Exception
HTTP3Client http3Client = new HTTP3Client(quicConfiguration, clientConnector);
ClientConnectionFactoryOverHTTP3.HTTP3 http3 = new ClientConnectionFactoryOverHTTP3.HTTP3(http3Client);
- // tag::mixedTransportProtocols[]
+ // tag::mixedTransports[]
HttpClient httpClient = new HttpClient(new HttpClientTransportDynamic(clientConnector, http2, http1, http3));
httpClient.start();
// Make a TCP request to a 3rd party web application.
ContentResponse thirdPartyResponse = httpClient.newRequest("https://third-party.com/api")
- // No need to specify the TransportProtocol, TCP will be used by default.
+ // No need to specify the Transport, TCP will be used by default.
.send();
// Upload the third party response content to a validation process.
ContentResponse validatedResponse = httpClient.newRequest("http://localhost/validate")
// The validation process is available via Unix-Domain.
- .transportProtocol(new TransportProtocol.TCPUnix(unixDomainPath))
+ .transport(new Transport.TCPUnix(unixDomainPath))
.method(HttpMethod.POST)
.body(new BytesRequestContent(thirdPartyResponse.getContent()))
.send();
@@ -1233,10 +1233,10 @@ public void mixedTransportProtocols() throws Exception
// it to another web application in the same Jetty server.
ContentResponse response = httpClient.newRequest("http://localhost/process")
// The processing is in-memory.
- .transportProtocol(new MemoryTransportProtocol(memoryConnector))
+ .transport(new MemoryTransport(memoryConnector))
.method(HttpMethod.POST)
.body(new BytesRequestContent(validatedResponse.getContent()))
.send();
- // end::mixedTransportProtocols[]
+ // end::mixedTransports[]
}
}
diff --git a/documentation/jetty-documentation/src/main/java/org/eclipse/jetty/docs/programming/server/http/HTTPServerDocs.java b/documentation/jetty-documentation/src/main/java/org/eclipse/jetty/docs/programming/server/http/HTTPServerDocs.java
index cc561eed6dd8..1572e0ceb686 100644
--- a/documentation/jetty-documentation/src/main/java/org/eclipse/jetty/docs/programming/server/http/HTTPServerDocs.java
+++ b/documentation/jetty-documentation/src/main/java/org/eclipse/jetty/docs/programming/server/http/HTTPServerDocs.java
@@ -66,7 +66,7 @@
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.HttpConnectionFactory;
import org.eclipse.jetty.server.MemoryConnector;
-import org.eclipse.jetty.server.MemoryTransportProtocol;
+import org.eclipse.jetty.server.MemoryTransport;
import org.eclipse.jetty.server.NetworkConnector;
import org.eclipse.jetty.server.ProxyConnectionFactory;
import org.eclipse.jetty.server.Request;
@@ -266,8 +266,8 @@ public void memoryConnector() throws Exception
httpClient.start();
ContentResponse response = httpClient.newRequest("http://localhost/")
- // Use the memory TransportProtocol to communicate with the server-side.
- .transportProtocol(new MemoryTransportProtocol(connector))
+ // Use the memory Transport to communicate with the server-side.
+ .transport(new MemoryTransport(connector))
.send();
// end::memoryConnector[]
}
diff --git a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectorHttpClientTransport.java b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectorHttpClientTransport.java
index 3794710e5520..2845f1fbf929 100644
--- a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectorHttpClientTransport.java
+++ b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectorHttpClientTransport.java
@@ -71,7 +71,7 @@ public void connect(SocketAddress address, Map context)
Promise promise = (Promise)context.get(HTTP_CONNECTION_PROMISE_CONTEXT_KEY);
context.put(ClientConnector.CONNECTION_PROMISE_CONTEXT_KEY, Promise.from(ioConnection -> {}, promise::failed));
context.put(ClientConnector.CLIENT_CONNECTOR_CONTEXT_KEY, connector);
- destination.getOrigin().getTransportProtocol().connect(address, context);
+ destination.getOrigin().getTransport().connect(address, context);
}
@Override
diff --git a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java
index 4785046748d7..67f95a677dc3 100644
--- a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java
+++ b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java
@@ -50,7 +50,7 @@
import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.ClientConnectionFactory;
import org.eclipse.jetty.io.ClientConnector;
-import org.eclipse.jetty.io.TransportProtocol;
+import org.eclipse.jetty.io.Transport;
import org.eclipse.jetty.io.ssl.SslClientConnectionFactory;
import org.eclipse.jetty.util.Fields;
import org.eclipse.jetty.util.Jetty;
@@ -468,16 +468,16 @@ public Origin createOrigin(Request request, Origin.Protocol protocol)
host = host.toLowerCase(Locale.ENGLISH);
int port = request.getPort();
port = normalizePort(scheme, port);
- TransportProtocol transportProtocol = request.getTransportProtocol();
- if (transportProtocol == null)
+ Transport transport = request.getTransport();
+ if (transport == null)
{
// Ask the ClientConnector for backwards compatibility
// until ClientConnector.Configurator is removed.
- transportProtocol = connector.newTransportProtocol();
- if (transportProtocol == null)
- transportProtocol = TransportProtocol.TCP_IP;
+ transport = connector.newTransport();
+ if (transport == null)
+ transport = Transport.TCP_IP;
}
- return new Origin(scheme, new Origin.Address(host, port), request.getTag(), protocol, transportProtocol);
+ return new Origin(scheme, new Origin.Address(host, port), request.getTag(), protocol, transport);
}
/**
@@ -540,10 +540,10 @@ public void newConnection(Destination destination, Promise promise)
if (proxy != null)
origin = proxy.getOrigin();
- TransportProtocol transportProtocol = origin.getTransportProtocol();
- context.put(TransportProtocol.class.getName(), transportProtocol);
+ Transport transport = origin.getTransport();
+ context.put(Transport.class.getName(), transport);
- if (transportProtocol.requiresDomainNamesResolution())
+ if (transport.requiresDomainNamesResolution())
{
Origin.Address address = origin.getAddress();
getSocketAddressResolver().resolve(address.getHost(), address.getPort(), new Promise<>()
@@ -574,14 +574,14 @@ public void failed(Throwable x)
connect(socketAddresses, nextIndex, context);
}
});
- transport.connect((SocketAddress)socketAddresses.get(index), context);
+ HttpClient.this.transport.connect((SocketAddress)socketAddresses.get(index), context);
}
});
}
else
{
context.put(HttpClientTransport.HTTP_CONNECTION_PROMISE_CONTEXT_KEY, promise);
- transport.connect(transportProtocol.getSocketAddress(), context);
+ this.transport.connect(transport.getSocketAddress(), context);
}
}
diff --git a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/HttpProxy.java b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/HttpProxy.java
index 4de7c7dc60c8..830f6425ea33 100644
--- a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/HttpProxy.java
+++ b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/HttpProxy.java
@@ -31,7 +31,7 @@
import org.eclipse.jetty.io.ClientConnectionFactory;
import org.eclipse.jetty.io.ClientConnector;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.TransportProtocol;
+import org.eclipse.jetty.io.Transport;
import org.eclipse.jetty.util.Attachable;
import org.eclipse.jetty.util.Promise;
import org.eclipse.jetty.util.ssl.SslContextFactory;
@@ -54,7 +54,7 @@ public HttpProxy(Origin.Address address, boolean secure)
public HttpProxy(Origin.Address address, boolean secure, Origin.Protocol protocol)
{
- this(new Origin(secure ? "https" : "http", address, null, protocol, TransportProtocol.TCP_IP), null);
+ this(new Origin(secure ? "https" : "http", address, null, protocol, Transport.TCP_IP), null);
}
public HttpProxy(Origin.Address address, SslContextFactory.Client sslContextFactory)
@@ -64,7 +64,7 @@ public HttpProxy(Origin.Address address, SslContextFactory.Client sslContextFact
public HttpProxy(Origin.Address address, SslContextFactory.Client sslContextFactory, Origin.Protocol protocol)
{
- this(new Origin(sslContextFactory == null ? "http" : "https", address, null, protocol, TransportProtocol.TCP_IP), sslContextFactory);
+ this(new Origin(sslContextFactory == null ? "http" : "https", address, null, protocol, Transport.TCP_IP), sslContextFactory);
}
public HttpProxy(Origin origin, SslContextFactory.Client sslContextFactory)
diff --git a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/Origin.java b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/Origin.java
index e5b7b4712e34..c4bf5686bee7 100644
--- a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/Origin.java
+++ b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/Origin.java
@@ -22,7 +22,7 @@
import org.eclipse.jetty.client.transport.HttpClientTransportDynamic;
import org.eclipse.jetty.io.ClientConnectionFactory;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.TransportProtocol;
+import org.eclipse.jetty.io.Transport;
import org.eclipse.jetty.util.HostPort;
import org.eclipse.jetty.util.URIUtil;
@@ -31,7 +31,7 @@
* The elements are {@code scheme}, {@code host}, {@code port}, a
* {@link Origin.Protocol}, a tag object that further distinguishes
* destinations that have the same scheme, host, port and protocol,
- * and a {@link TransportProtocol}.
+ * and a {@link Transport}.
* In general it is possible that, for the same scheme, host and port,
* the server can speak different protocols (for example, clear-text HTTP/1.1
* and clear-text HTTP/2), so the {@link Origin.Protocol} makes that distinction.
@@ -42,7 +42,7 @@
* so that all the connections to the server associated to that destination can
* specify the PROXY protocol bytes for that particular client connection.
* Finally, it is necessary to have different destinations for the same
- * scheme, host, port, and protocol, but having different {@link TransportProtocol},
+ * scheme, host, port, and protocol, but having different {@link Transport},
* for example when the same server may be reached via TCP/IP but also via
* Unix-Domain sockets.
*/
@@ -52,7 +52,7 @@ public class Origin
private final Address address;
private final Object tag;
private final Protocol protocol;
- private final TransportProtocol transport;
+ private final Transport transport;
public Origin(String scheme, String host, int port)
{
@@ -81,10 +81,10 @@ public Origin(String scheme, Address address, Object tag)
public Origin(String scheme, Address address, Object tag, Protocol protocol)
{
- this(scheme, address, tag, protocol, TransportProtocol.TCP_IP);
+ this(scheme, address, tag, protocol, Transport.TCP_IP);
}
- public Origin(String scheme, Address address, Object tag, Protocol protocol, TransportProtocol transport)
+ public Origin(String scheme, Address address, Object tag, Protocol protocol, Transport transport)
{
this.scheme = Objects.requireNonNull(scheme);
this.address = address;
@@ -113,7 +113,7 @@ public Protocol getProtocol()
return protocol;
}
- public TransportProtocol getTransportProtocol()
+ public Transport getTransport()
{
return transport;
}
@@ -155,7 +155,7 @@ public String toString()
asString(),
getTag(),
getProtocol(),
- getTransportProtocol()
+ getTransport()
);
}
diff --git a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/Request.java b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/Request.java
index 1bd11eaea2e9..4a7982d801a1 100644
--- a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/Request.java
+++ b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/Request.java
@@ -33,7 +33,7 @@
import org.eclipse.jetty.http.HttpFields;
import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.http.HttpVersion;
-import org.eclipse.jetty.io.TransportProtocol;
+import org.eclipse.jetty.io.Transport;
import org.eclipse.jetty.util.Fields;
/**
@@ -105,18 +105,18 @@ default Request port(int port)
}
/**
- * @param transport the {@link TransportProtocol} of this request
+ * @param transport the {@link Transport} of this request
* @return this request object
*/
- default Request transportProtocol(TransportProtocol transport)
+ default Request transport(Transport transport)
{
return this;
}
/**
- * @return the {@link TransportProtocol} of this request
+ * @return the {@link Transport} of this request
*/
- default TransportProtocol getTransportProtocol()
+ default Transport getTransport()
{
return null;
}
diff --git a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/transport/HttpClientConnectionFactory.java b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/transport/HttpClientConnectionFactory.java
index e2a1ee43c850..c5e9f081a857 100644
--- a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/transport/HttpClientConnectionFactory.java
+++ b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/transport/HttpClientConnectionFactory.java
@@ -19,7 +19,7 @@
import org.eclipse.jetty.client.transport.internal.HttpConnectionOverHTTP;
import org.eclipse.jetty.io.ClientConnectionFactory;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.TransportProtocol;
+import org.eclipse.jetty.io.Transport;
public class HttpClientConnectionFactory implements ClientConnectionFactory
{
@@ -51,9 +51,9 @@ public List getProtocols(boolean secure)
}
@Override
- public TransportProtocol newTransportProtocol()
+ public Transport newTransport()
{
- return TransportProtocol.TCP_IP;
+ return Transport.TCP_IP;
}
@Override
diff --git a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/transport/HttpClientTransportDynamic.java b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/transport/HttpClientTransportDynamic.java
index f2dc17931def..8f7da5848174 100644
--- a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/transport/HttpClientTransportDynamic.java
+++ b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/transport/HttpClientTransportDynamic.java
@@ -36,7 +36,7 @@
import org.eclipse.jetty.io.ClientConnector;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.TransportProtocol;
+import org.eclipse.jetty.io.Transport;
import org.eclipse.jetty.util.annotation.ManagedObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -213,15 +213,15 @@ else if (matches == 1)
if (matchingInfos.isEmpty())
return getHttpClient().createOrigin(request, null);
- TransportProtocol transportProtocol = request.getTransportProtocol();
- if (transportProtocol == null)
+ Transport transport = request.getTransport();
+ if (transport == null)
{
// Ask the ClientConnector for backwards compatibility
// until ClientConnector.Configurator is removed.
- transportProtocol = getClientConnector().newTransportProtocol();
- if (transportProtocol == null)
- transportProtocol = matchingInfos.get(0).newTransportProtocol();
- request.transportProtocol(transportProtocol);
+ transport = getClientConnector().newTransport();
+ if (transport == null)
+ transport = matchingInfos.get(0).newTransport();
+ request.transport(transport);
}
List protocols = matchingInfos.stream()
@@ -253,7 +253,7 @@ public org.eclipse.jetty.io.Connection newConnection(EndPoint endPoint, Map getProtocols(boolean secure)
}
@Override
- public TransportProtocol newTransportProtocol()
+ public Transport newTransport()
{
- return TransportProtocol.TCP_IP;
+ return Transport.TCP_IP;
}
@Override
diff --git a/jetty-core/jetty-http2/jetty-http2-client-transport/src/main/java/org/eclipse/jetty/http2/client/transport/HttpClientTransportOverHTTP2.java b/jetty-core/jetty-http2/jetty-http2-client-transport/src/main/java/org/eclipse/jetty/http2/client/transport/HttpClientTransportOverHTTP2.java
index 0b0e3fc27c67..e6a2d2dda5f6 100644
--- a/jetty-core/jetty-http2/jetty-http2-client-transport/src/main/java/org/eclipse/jetty/http2/client/transport/HttpClientTransportOverHTTP2.java
+++ b/jetty-core/jetty-http2/jetty-http2-client-transport/src/main/java/org/eclipse/jetty/http2/client/transport/HttpClientTransportOverHTTP2.java
@@ -132,7 +132,7 @@ public void connect(InetSocketAddress address, Map context)
protected void connect(SocketAddress address, ClientConnectionFactory factory, Session.Listener listener, Promise promise, Map context)
{
HttpDestination destination = (HttpDestination)context.get(HTTP_DESTINATION_CONTEXT_KEY);
- getHTTP2Client().connect(destination.getOrigin().getTransportProtocol(), address, factory, listener, promise, context);
+ getHTTP2Client().connect(destination.getOrigin().getTransport(), address, factory, listener, promise, context);
}
protected void connect(InetSocketAddress address, ClientConnectionFactory factory, Session.Listener listener, Promise promise, Map context)
diff --git a/jetty-core/jetty-http2/jetty-http2-client/src/main/java/org/eclipse/jetty/http2/client/HTTP2Client.java b/jetty-core/jetty-http2/jetty-http2-client/src/main/java/org/eclipse/jetty/http2/client/HTTP2Client.java
index baf5c0de356d..77263270b914 100644
--- a/jetty-core/jetty-http2/jetty-http2-client/src/main/java/org/eclipse/jetty/http2/client/HTTP2Client.java
+++ b/jetty-core/jetty-http2/jetty-http2-client/src/main/java/org/eclipse/jetty/http2/client/HTTP2Client.java
@@ -32,7 +32,7 @@
import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.ClientConnectionFactory;
import org.eclipse.jetty.io.ClientConnector;
-import org.eclipse.jetty.io.TransportProtocol;
+import org.eclipse.jetty.io.Transport;
import org.eclipse.jetty.io.ssl.SslClientConnectionFactory;
import org.eclipse.jetty.util.Promise;
import org.eclipse.jetty.util.annotation.ManagedAttribute;
@@ -423,31 +423,31 @@ public void connect(SslContextFactory.Client sslContextFactory, SocketAddress ad
public void connect(SslContextFactory.Client sslContextFactory, SocketAddress address, Session.Listener listener, Promise promise, Map context)
{
- connect(TransportProtocol.TCP_IP, sslContextFactory, address, listener, promise, context);
+ connect(Transport.TCP_IP, sslContextFactory, address, listener, promise, context);
}
- public CompletableFuture connect(TransportProtocol transportProtocol, SslContextFactory.Client sslContextFactory, SocketAddress address, Session.Listener listener)
+ public CompletableFuture connect(Transport transport, SslContextFactory.Client sslContextFactory, SocketAddress address, Session.Listener listener)
{
- return Promise.Completable.with(p -> connect(transportProtocol, sslContextFactory, address, listener, p, null));
+ return Promise.Completable.with(p -> connect(transport, sslContextFactory, address, listener, p, null));
}
- public void connect(TransportProtocol transportProtocol, SslContextFactory.Client sslContextFactory, SocketAddress address, Session.Listener listener, Promise promise, Map context)
+ public void connect(Transport transport, SslContextFactory.Client sslContextFactory, SocketAddress address, Session.Listener listener, Promise promise, Map context)
{
ClientConnectionFactory factory = newClientConnectionFactory(sslContextFactory);
- connect(transportProtocol, address, factory, listener, promise, context);
+ connect(transport, address, factory, listener, promise, context);
}
public void connect(SocketAddress address, ClientConnectionFactory factory, Session.Listener listener, Promise promise, Map context)
{
- connect(TransportProtocol.TCP_IP, address, factory, listener, promise, context);
+ connect(Transport.TCP_IP, address, factory, listener, promise, context);
}
- public void connect(TransportProtocol transportProtocol, SocketAddress address, ClientConnectionFactory factory, Session.Listener listener, Promise promise, Map context)
+ public void connect(Transport transport, SocketAddress address, ClientConnectionFactory factory, Session.Listener listener, Promise promise, Map context)
{
context = contextFrom(factory, listener, promise, context);
- context.put(TransportProtocol.class.getName(), transportProtocol);
+ context.put(Transport.class.getName(), transport);
context.put(ClientConnector.CONNECTION_PROMISE_CONTEXT_KEY, Promise.from(ioConnection -> {}, promise::failed));
- transportProtocol.connect(address, context);
+ transport.connect(address, context);
}
public void accept(SslContextFactory.Client sslContextFactory, SocketChannel channel, Session.Listener listener, Promise promise)
@@ -458,13 +458,13 @@ public void accept(SslContextFactory.Client sslContextFactory, SocketChannel cha
public void accept(SocketChannel channel, ClientConnectionFactory factory, Session.Listener listener, Promise promise)
{
- accept(TransportProtocol.TCP_IP, channel, factory, listener, promise);
+ accept(Transport.TCP_IP, channel, factory, listener, promise);
}
- public void accept(TransportProtocol transportProtocol, SocketChannel channel, ClientConnectionFactory factory, Session.Listener listener, Promise promise)
+ public void accept(Transport transport, SocketChannel channel, ClientConnectionFactory factory, Session.Listener listener, Promise promise)
{
Map context = contextFrom(factory, listener, promise, null);
- context.put(TransportProtocol.class.getName(), transportProtocol);
+ context.put(Transport.class.getName(), transport);
context.put(ClientConnector.CONNECTION_PROMISE_CONTEXT_KEY, Promise.from(ioConnection -> {}, promise::failed));
connector.accept(channel, context);
}
diff --git a/jetty-core/jetty-http3/jetty-http3-client-transport/src/main/java/org/eclipse/jetty/http3/client/transport/ClientConnectionFactoryOverHTTP3.java b/jetty-core/jetty-http3/jetty-http3-client-transport/src/main/java/org/eclipse/jetty/http3/client/transport/ClientConnectionFactoryOverHTTP3.java
index a71c5960079e..f6fa9a5a6dcd 100644
--- a/jetty-core/jetty-http3/jetty-http3-client-transport/src/main/java/org/eclipse/jetty/http3/client/transport/ClientConnectionFactoryOverHTTP3.java
+++ b/jetty-core/jetty-http3/jetty-http3-client-transport/src/main/java/org/eclipse/jetty/http3/client/transport/ClientConnectionFactoryOverHTTP3.java
@@ -23,8 +23,8 @@
import org.eclipse.jetty.http3.client.transport.internal.SessionClientListener;
import org.eclipse.jetty.io.ClientConnectionFactory;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.TransportProtocol;
-import org.eclipse.jetty.quic.client.QuicTransportProtocol;
+import org.eclipse.jetty.io.Transport;
+import org.eclipse.jetty.quic.client.QuicTransport;
import org.eclipse.jetty.quic.common.ProtocolSession;
import org.eclipse.jetty.quic.common.QuicSession;
import org.eclipse.jetty.util.component.ContainerLifeCycle;
@@ -73,9 +73,9 @@ public List getProtocols(boolean secure)
}
@Override
- public TransportProtocol newTransportProtocol()
+ public Transport newTransport()
{
- return new QuicTransportProtocol(getHTTP3Client().getQuicConfiguration());
+ return new QuicTransport(getHTTP3Client().getQuicConfiguration());
}
@Override
diff --git a/jetty-core/jetty-http3/jetty-http3-client-transport/src/main/java/org/eclipse/jetty/http3/client/transport/HttpClientTransportOverHTTP3.java b/jetty-core/jetty-http3/jetty-http3-client-transport/src/main/java/org/eclipse/jetty/http3/client/transport/HttpClientTransportOverHTTP3.java
index 1b3390ee144a..ef2b3bc65234 100644
--- a/jetty-core/jetty-http3/jetty-http3-client-transport/src/main/java/org/eclipse/jetty/http3/client/transport/HttpClientTransportOverHTTP3.java
+++ b/jetty-core/jetty-http3/jetty-http3-client-transport/src/main/java/org/eclipse/jetty/http3/client/transport/HttpClientTransportOverHTTP3.java
@@ -36,8 +36,8 @@
import org.eclipse.jetty.http3.client.transport.internal.SessionClientListener;
import org.eclipse.jetty.io.ClientConnector;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.TransportProtocol;
-import org.eclipse.jetty.quic.client.QuicTransportProtocol;
+import org.eclipse.jetty.io.Transport;
+import org.eclipse.jetty.quic.client.QuicTransport;
import org.eclipse.jetty.quic.common.ProtocolSession;
import org.eclipse.jetty.quic.common.QuicSession;
@@ -87,9 +87,9 @@ protected void doStart() throws Exception
@Override
public Origin newOrigin(Request request)
{
- TransportProtocol transportProtocol = request.getTransportProtocol();
- if (transportProtocol == null)
- request.transportProtocol(new QuicTransportProtocol(http3Client.getQuicConfiguration()));
+ Transport transport = request.getTransport();
+ if (transport == null)
+ request.transport(new QuicTransport(http3Client.getQuicConfiguration()));
return getHttpClient().createOrigin(request, new Origin.Protocol(List.of("h3"), false));
}
@@ -112,7 +112,7 @@ public void connect(SocketAddress address, Map context)
context.put(ClientConnector.CLIENT_CONNECTION_FACTORY_CONTEXT_KEY, destination.getClientConnectionFactory());
SessionClientListener listener = new TransportSessionClientListener(context);
- getHTTP3Client().connect(destination.getOrigin().getTransportProtocol(), address, listener, context)
+ getHTTP3Client().connect(destination.getOrigin().getTransport(), address, listener, context)
.whenComplete(listener::onConnect);
}
diff --git a/jetty-core/jetty-http3/jetty-http3-client/src/main/java/org/eclipse/jetty/http3/client/HTTP3Client.java b/jetty-core/jetty-http3/jetty-http3-client/src/main/java/org/eclipse/jetty/http3/client/HTTP3Client.java
index eda8e93f9d0c..b8bfe7f32010 100644
--- a/jetty-core/jetty-http3/jetty-http3-client/src/main/java/org/eclipse/jetty/http3/client/HTTP3Client.java
+++ b/jetty-core/jetty-http3/jetty-http3-client/src/main/java/org/eclipse/jetty/http3/client/HTTP3Client.java
@@ -23,11 +23,11 @@
import org.eclipse.jetty.http3.api.Session;
import org.eclipse.jetty.io.ClientConnector;
import org.eclipse.jetty.io.DatagramChannelEndPoint;
-import org.eclipse.jetty.io.TransportProtocol;
+import org.eclipse.jetty.io.Transport;
import org.eclipse.jetty.quic.client.ClientQuicConfiguration;
import org.eclipse.jetty.quic.client.ClientQuicConnection;
import org.eclipse.jetty.quic.client.ClientQuicSession;
-import org.eclipse.jetty.quic.client.QuicTransportProtocol;
+import org.eclipse.jetty.quic.client.QuicTransport;
import org.eclipse.jetty.quic.common.QuicSessionContainer;
import org.eclipse.jetty.util.Promise;
import org.eclipse.jetty.util.component.ContainerLifeCycle;
@@ -190,10 +190,10 @@ public CompletableFuture connect(SocketAddress socketAddress, Se
{
if (context == null)
context = new ConcurrentHashMap<>();
- return connect(new QuicTransportProtocol(getQuicConfiguration()), socketAddress, listener, context);
+ return connect(new QuicTransport(getQuicConfiguration()), socketAddress, listener, context);
}
- public CompletableFuture connect(TransportProtocol transportProtocol, SocketAddress socketAddress, Session.Client.Listener listener, Map context)
+ public CompletableFuture connect(Transport transport, SocketAddress socketAddress, Session.Client.Listener listener, Map context)
{
if (context == null)
context = new ConcurrentHashMap<>();
@@ -204,12 +204,12 @@ public CompletableFuture connect(TransportProtocol transportProt
context.putIfAbsent(ClientConnector.CLIENT_CONNECTOR_CONTEXT_KEY, connector);
context.computeIfAbsent(ClientConnector.CLIENT_CONNECTION_FACTORY_CONTEXT_KEY, key -> new HTTP3ClientConnectionFactory());
context.put(ClientConnector.CONNECTION_PROMISE_CONTEXT_KEY, Promise.from(ioConnection -> {}, completable::failed));
- context.put(TransportProtocol.class.getName(), transportProtocol);
+ context.put(Transport.class.getName(), transport);
if (LOG.isDebugEnabled())
LOG.debug("connecting to {}", socketAddress);
- transportProtocol.connect(socketAddress, context);
+ transport.connect(socketAddress, context);
return completable;
}
diff --git a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ClientConnectionFactory.java b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ClientConnectionFactory.java
index 9fbeb7d14ef4..82a29c2cbffe 100644
--- a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ClientConnectionFactory.java
+++ b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ClientConnectionFactory.java
@@ -92,9 +92,9 @@ public ClientConnectionFactory getClientConnectionFactory()
}
/**
- * @return the default {@link TransportProtocol} used by the protocol
+ * @return the default {@link Transport} used by the protocol
*/
- public abstract TransportProtocol newTransportProtocol();
+ public abstract Transport newTransport();
/**
* Tests whether one of the protocol identifiers of this
diff --git a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ClientConnector.java b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ClientConnector.java
index 0049e6e56ca8..1225a4b634b1 100644
--- a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ClientConnector.java
+++ b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ClientConnector.java
@@ -85,7 +85,7 @@ public class ClientConnector extends ContainerLifeCycle
*
* @param path the Unix-Domain path to connect to
* @return a ClientConnector that connects to the given Unix-Domain path
- * @deprecated replaced by {@link TransportProtocol.TCPUnix}
+ * @deprecated replaced by {@link Transport.TCPUnix}
*/
@Deprecated(since = "12.0.7", forRemoval = true)
public static ClientConnector forUnixDomain(Path path)
@@ -117,7 +117,7 @@ public ClientConnector()
/**
* @param configurator the {@link Configurator}
- * @deprecated replaced by {@link TransportProtocol}
+ * @deprecated replaced by {@link Transport}
*/
@Deprecated(since = "12.0.7", forRemoval = true)
public ClientConnector(Configurator configurator)
@@ -132,7 +132,7 @@ public ClientConnector(Configurator configurator)
* @return whether the connection to the given SocketAddress is intrinsically secure
* @see Configurator#isIntrinsicallySecure(ClientConnector, SocketAddress)
*
- * @deprecated replaced by {@link TransportProtocol#isIntrinsicallySecure()}
+ * @deprecated replaced by {@link Transport#isIntrinsicallySecure()}
*/
@Deprecated(since = "12.0.7", forRemoval = true)
public boolean isIntrinsicallySecure(SocketAddress address)
@@ -151,18 +151,18 @@ public Executor getExecutor()
}
/**
- *
Returns the default {@link TransportProtocol} for this connector.
+ * Returns the default {@link Transport} for this connector.
* This method only exists for backwards compatibility, when
* {@link Configurator} was used, and should be removed when
* {@link Configurator} is removed.
*
- * @return the default {@link TransportProtocol} for this connector
- * @deprecated use {@link TransportProtocol} instead
+ * @return the default {@link Transport} for this connector
+ * @deprecated use {@link Transport} instead
*/
@Deprecated(since = "12.0.7", forRemoval = true)
- public TransportProtocol newTransportProtocol()
+ public Transport newTransport()
{
- return configurator.newTransportProtocol();
+ return configurator.newTransport();
}
public void setExecutor(Executor executor)
@@ -433,7 +433,7 @@ public void connect(SocketAddress address, Map context)
{
context.put(ClientConnector.CLIENT_CONNECTOR_CONTEXT_KEY, this);
- TransportProtocol transport = (TransportProtocol)context.get(TransportProtocol.class.getName());
+ Transport transport = (Transport)context.get(Transport.class.getName());
if (address == null)
address = transport.getSocketAddress();
@@ -554,14 +554,14 @@ protected EndPoint newEndPoint(SelectableChannel selectable, ManagedSelector sel
{
@SuppressWarnings("unchecked")
Map context = (Map)selectionKey.attachment();
- TransportProtocol transportProtocol = (TransportProtocol)context.get(TransportProtocol.class.getName());
- return transportProtocol.newEndPoint(getScheduler(), selector, selectable, selectionKey);
+ Transport transport = (Transport)context.get(Transport.class.getName());
+ return transport.newEndPoint(getScheduler(), selector, selectable, selectionKey);
}
protected Connection newConnection(EndPoint endPoint, Map context) throws IOException
{
- TransportProtocol transportProtocol = (TransportProtocol)context.get(TransportProtocol.class.getName());
- return transportProtocol.newConnection(endPoint, context);
+ Transport transport = (Transport)context.get(Transport.class.getName());
+ return transport.newConnection(endPoint, context);
}
protected void acceptFailed(Throwable failure, SelectableChannel channel, Map context)
@@ -637,15 +637,15 @@ protected void connectionFailed(SelectableChannel channel, Throwable failure, Ob
/**
* Configures a {@link ClientConnector}.
*
- * @deprecated replaced by {@link TransportProtocol}
+ * @deprecated replaced by {@link Transport}
*/
@Deprecated(since = "12.0.7", forRemoval = true)
public static class Configurator extends ContainerLifeCycle
{
/**
- * @return the default {@link TransportProtocol} for this configurator
+ * @return the default {@link Transport} for this configurator
*/
- public TransportProtocol newTransportProtocol()
+ public Transport newTransport()
{
return null;
}
@@ -709,7 +709,7 @@ public Connection newConnection(ClientConnector clientConnector, SocketAddress a
/**
* A pair/record holding a {@link SelectableChannel} and a {@link SocketAddress} to connect to.
*
- * @deprecated replaced by {@link TransportProtocol}
+ * @deprecated replaced by {@link Transport}
*/
@Deprecated(since = "12.0.7", forRemoval = true)
public static class ChannelWithAddress
@@ -739,9 +739,9 @@ private static Configurator forUnixDomain(Path path)
return new Configurator()
{
@Override
- public TransportProtocol newTransportProtocol()
+ public Transport newTransport()
{
- return new TransportProtocol.TCPUnix(path);
+ return new Transport.TCPUnix(path);
}
@Override
diff --git a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/TransportProtocol.java b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/Transport.java
similarity index 83%
rename from jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/TransportProtocol.java
rename to jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/Transport.java
index 31709aa3f56e..0caef553c566 100644
--- a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/TransportProtocol.java
+++ b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/Transport.java
@@ -28,7 +28,7 @@
import org.eclipse.jetty.util.thread.Scheduler;
/**
- * The low-level transport protocol used by clients.
+ * The low-level transport used by clients.
* A high-level protocol such as HTTP/1.1 can be transported over a low-level
* protocol such as TCP/IP, Unix-Domain sockets, QUIC, shared memory, etc.
* This class defines the programming interface to implement low-level
@@ -38,7 +38,7 @@
* lower-level than others, but from the point of view of the high-level
* protocols they are all considered low-level.
* For example, QUIC is typically layered on top of the UDP/IP low-level
- * transport protocol, but it may be layered on top Unix-Domain sockets,
+ * {@code Transport}, but it may be layered on top Unix-Domain sockets,
* or on top of shared memory.
* As QUIC provides a reliable, ordered, stream-based transport, it may
* be seen as a replacement for TCP, and high-level protocols that need
@@ -47,20 +47,20 @@
* This makes possible to transport HTTP/1.1 over QUIC over Unix-Domain
* sockets, or HTTP/2 over QUIC over shared memory, etc.
*/
-public interface TransportProtocol
+public interface Transport
{
/**
- * The transport protocol TCP/IP.
+ * The TCP/IP {@code Transport}.
*/
- TransportProtocol TCP_IP = new TCPIP();
+ Transport TCP_IP = new TCPIP();
/**
- * The transport protocol UDP/IP.
+ * The UDP/IP {@code Transport}.
*/
- TransportProtocol UDP_IP = new UDPIP();
+ Transport UDP_IP = new UDPIP();
/**
- * @return whether this transport protocol is intrinsically secure.
+ * @return whether this {@code Transport} is intrinsically secure.
*/
default boolean isIntrinsicallySecure()
{
@@ -68,7 +68,7 @@ default boolean isIntrinsicallySecure()
}
/**
- * Returns whether this transport protocol requires resolution of domain
+ *
Returns whether this {@code Transport} requires resolution of domain
* names.
* When domain name resolution is required, it must be performed by
* an external service, and the value returned by {@link #getSocketAddress()}
@@ -78,7 +78,7 @@ default boolean isIntrinsicallySecure()
* by {@link #getSocketAddress()} is eventually passed to
* {@link #connect(SocketAddress, Map)}.
*
- * @return whether this transport protocol requires domain names resolution
+ * @return whether this {@code Transport} requires domain names resolution
*/
default boolean requiresDomainNamesResolution()
{
@@ -87,10 +87,10 @@ default boolean requiresDomainNamesResolution()
/**
* Establishes a connection to the given socket address.
- * For transport protocols that {@link #requiresDomainNamesResolution()
+ *
For {@code Transport}s that {@link #requiresDomainNamesResolution()
* require domain name resolution}, this is the IP address resolved from
* the domain name.
- * For transport protocols that do not require domain name resolution
+ * For {@code Transport}s that do not require domain name resolution
* (for example Unix-Domain sockets, or memory) this is the socket address
* to connect to.
*
@@ -110,8 +110,8 @@ default SocketAddress getSocketAddress()
}
/**
- * For transport protocols that are based on sockets, or for transport protocols
- * that are layered on top of another transport protocol that is based on sockets,
+ *
For {@code Transport}s that are based on sockets, or for {@code Transport}s
+ * that are layered on top of another {@code Transport} that is based on sockets,
* this method is invoked to create a new {@link SelectableChannel} used for the
* socket communication.
*
@@ -125,8 +125,8 @@ default SelectableChannel newSelectableChannel() throws IOException
}
/**
- * For transport protocols that are based on sockets, or for transport protocols
- * that are layered on top of another transport protocol that is based on sockets,
+ *
For {@code Transport}s that are based on sockets, or for {@code Transport}s
+ * that are layered on top of another {@code Transport} that is based on sockets,
* this method is invoked to create a new {@link EndPoint} that wraps the
* {@link SelectableChannel} created by {@link #newSelectableChannel()}.
*
@@ -143,10 +143,10 @@ default EndPoint newEndPoint(Scheduler scheduler, ManagedSelector selector, Sele
/**
* Creates a new {@link Connection} to be associated with the given low-level {@link EndPoint}.
- * For non-layered transport protocols such as TCP/IP, the {@link Connection} is typically
+ *
For non-layered {@code Transport}s such as TCP/IP, the {@link Connection} is typically
* that of the high-level protocol.
- * For layered transport protocols such as QUIC, the {@link Connection} is typically that of the
- * layered transport protocol.
+ * For layered {@code Transport}s such as QUIC, the {@link Connection} is typically that of the
+ * layered {@code Transport}.
*
* @param endPoint the {@link EndPoint} to associate the {@link Connection} to
* @param context the context information to create the connection
@@ -164,9 +164,9 @@ default Connection newConnection(EndPoint endPoint, Map context)
boolean equals(Object obj);
/**
- * Abstract implementation of transport protocols based on sockets.
+ * Abstract implementation of {@code Transport} based on sockets.
*/
- abstract class Socket implements TransportProtocol
+ abstract class Socket implements Transport
{
@Override
public void connect(SocketAddress socketAddress, Map context)
@@ -183,7 +183,7 @@ public String toString()
}
/**
- * Abstract implementation of transport protocols based on IP.
+ * Abstract implementation of {@code Transport} based on IP.
*/
abstract class IP extends Socket
{
@@ -195,7 +195,7 @@ public boolean requiresDomainNamesResolution()
}
/**
- * The TCP/IP transport protocol.
+ * The TCP/IP {@code Transport}.
*/
class TCPIP extends IP
{
@@ -218,9 +218,9 @@ public EndPoint newEndPoint(Scheduler scheduler, ManagedSelector selector, Selec
}
/**
- * The UDP/IP transport protocol.
+ * The UDP/IP {@code Transport}.
*/
- class UDPIP extends TransportProtocol.IP
+ class UDPIP extends Transport.IP
{
protected UDPIP()
{
@@ -241,7 +241,7 @@ public EndPoint newEndPoint(Scheduler scheduler, ManagedSelector selector, Selec
}
/**
- * Abstract implementation of transport protocols based on Unix-Domain sockets.
+ * Abstract implementation of {@code Transport} based on Unix-Domain sockets.
*/
abstract class Unix extends Socket
{
@@ -282,7 +282,7 @@ public String toString()
}
/**
- * The stream Unix-Domain socket transport protocol.
+ * The stream Unix-Domain socket {@code Transport}.
*/
class TCPUnix extends Unix
{
@@ -305,7 +305,7 @@ public EndPoint newEndPoint(Scheduler scheduler, ManagedSelector selector, Selec
}
/**
- * The datagram Unix-Domain socket transport protocol.
+ * The datagram Unix-Domain socket {@code Transport}.
*/
class UDPUnix extends Unix
{
@@ -328,25 +328,25 @@ public EndPoint newEndPoint(Scheduler scheduler, ManagedSelector selector, Selec
}
/**
- * A wrapper for {@link TransportProtocol} instances to allow layering of transport protocols.
+ * A wrapper for {@link Transport} instances to allow layering of {@code Transport}s.
*/
- class Wrapper implements TransportProtocol
+ class Wrapper implements Transport
{
- private final TransportProtocol wrapped;
+ private final Transport wrapped;
- public Wrapper(TransportProtocol wrapped)
+ public Wrapper(Transport wrapped)
{
this.wrapped = Objects.requireNonNull(wrapped);
}
- public TransportProtocol getWrapped()
+ public Transport getWrapped()
{
return wrapped;
}
- public TransportProtocol unwrap()
+ public Transport unwrap()
{
- TransportProtocol result = getWrapped();
+ Transport result = getWrapped();
while (true)
{
if (result instanceof Wrapper wrapper)
diff --git a/jetty-core/jetty-quic/jetty-quic-client/src/main/java/org/eclipse/jetty/quic/client/QuicClientConnectorConfigurator.java b/jetty-core/jetty-quic/jetty-quic-client/src/main/java/org/eclipse/jetty/quic/client/QuicClientConnectorConfigurator.java
index 6a4bcd01a2d8..bd9aa1986894 100644
--- a/jetty-core/jetty-quic/jetty-quic-client/src/main/java/org/eclipse/jetty/quic/client/QuicClientConnectorConfigurator.java
+++ b/jetty-core/jetty-quic/jetty-quic-client/src/main/java/org/eclipse/jetty/quic/client/QuicClientConnectorConfigurator.java
@@ -29,7 +29,7 @@
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.ManagedSelector;
import org.eclipse.jetty.io.SocketChannelEndPoint;
-import org.eclipse.jetty.io.TransportProtocol;
+import org.eclipse.jetty.io.Transport;
import org.eclipse.jetty.quic.common.QuicConfiguration;
import org.eclipse.jetty.util.ssl.SslContextFactory;
@@ -40,7 +40,7 @@
* {@link SocketChannelEndPoint}s.
*
* @see QuicConfiguration
- * @deprecated replaced by {@link TransportProtocol}
+ * @deprecated replaced by {@link Transport}
*/
@Deprecated(since = "12.0.7", forRemoval = true)
public class QuicClientConnectorConfigurator extends ClientConnector.Configurator
@@ -97,9 +97,9 @@ protected void doStart() throws Exception
}
@Override
- public TransportProtocol newTransportProtocol()
+ public Transport newTransport()
{
- return new QuicTransportProtocol(quicConfig);
+ return new QuicTransport(quicConfig);
}
@Override
diff --git a/jetty-core/jetty-quic/jetty-quic-client/src/main/java/org/eclipse/jetty/quic/client/QuicTransportProtocol.java b/jetty-core/jetty-quic/jetty-quic-client/src/main/java/org/eclipse/jetty/quic/client/QuicTransport.java
similarity index 81%
rename from jetty-core/jetty-quic/jetty-quic-client/src/main/java/org/eclipse/jetty/quic/client/QuicTransportProtocol.java
rename to jetty-core/jetty-quic/jetty-quic-client/src/main/java/org/eclipse/jetty/quic/client/QuicTransport.java
index 6ae1d5da8ea5..a8d0999adae1 100644
--- a/jetty-core/jetty-quic/jetty-quic-client/src/main/java/org/eclipse/jetty/quic/client/QuicTransportProtocol.java
+++ b/jetty-core/jetty-quic/jetty-quic-client/src/main/java/org/eclipse/jetty/quic/client/QuicTransport.java
@@ -20,24 +20,24 @@
import org.eclipse.jetty.io.ClientConnector;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.TransportProtocol;
+import org.eclipse.jetty.io.Transport;
import org.eclipse.jetty.quic.common.QuicConfiguration;
/**
- * A {@link TransportProtocol} for QUIC that delegates to another {@code TransportProtocol}.
- * By default, the delegate is {@link TransportProtocol#UDP_IP}, but it may be a different
+ *
A {@link Transport} for QUIC that delegates to another {@code Transport}.
+ * By default, the delegate is {@link Transport#UDP_IP}, but it may be a different
* implementation.
*/
-public class QuicTransportProtocol extends TransportProtocol.Wrapper
+public class QuicTransport extends Transport.Wrapper
{
private final ClientQuicConfiguration quicConfiguration;
- public QuicTransportProtocol(ClientQuicConfiguration quicConfiguration)
+ public QuicTransport(ClientQuicConfiguration quicConfiguration)
{
this(UDP_IP, quicConfiguration);
}
- public QuicTransportProtocol(TransportProtocol wrapped, ClientQuicConfiguration quicConfiguration)
+ public QuicTransport(Transport wrapped, ClientQuicConfiguration quicConfiguration)
{
super(wrapped);
this.quicConfiguration = quicConfiguration;
@@ -74,7 +74,7 @@ public boolean equals(Object obj)
{
if (this == obj)
return true;
- if (obj instanceof QuicTransportProtocol that)
+ if (obj instanceof QuicTransport that)
return Objects.equals(getWrapped(), that.getWrapped());
return false;
}
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/MemoryTransportProtocol.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/MemoryTransport.java
similarity index 81%
rename from jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/MemoryTransportProtocol.java
rename to jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/MemoryTransport.java
index 9ad145357a45..c2c3e29f84f4 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/MemoryTransportProtocol.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/MemoryTransport.java
@@ -20,17 +20,17 @@
import org.eclipse.jetty.io.ClientConnector;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.TransportProtocol;
+import org.eclipse.jetty.io.Transport;
import org.eclipse.jetty.util.Promise;
/**
- * A {@link TransportProtocol} suitable to be used when using a {@link MemoryConnector}.
+ * A {@link Transport} suitable to be used when using a {@link MemoryConnector}.
*/
-public class MemoryTransportProtocol implements TransportProtocol
+public class MemoryTransport implements Transport
{
private final MemoryConnector connector;
- public MemoryTransportProtocol(MemoryConnector connector)
+ public MemoryTransport(MemoryConnector connector)
{
this.connector = connector;
}
@@ -46,10 +46,10 @@ public void connect(SocketAddress socketAddress, Map context)
ClientConnector clientConnector = (ClientConnector)context.get(ClientConnector.CLIENT_CONNECTOR_CONTEXT_KEY);
endPoint.setIdleTimeout(clientConnector.getIdleTimeout().toMillis());
- // This instance may be nested inside other TransportProtocol instances.
+ // This instance may be nested inside other Transport instances.
// Retrieve the outermost instance to call newConnection().
- TransportProtocol transportProtocol = (TransportProtocol)context.get(TransportProtocol.class.getName());
- Connection connection = transportProtocol.newConnection(endPoint, context);
+ Transport transport = (Transport)context.get(Transport.class.getName());
+ Connection connection = transport.newConnection(endPoint, context);
endPoint.setConnection(connection);
endPoint.onOpen();
@@ -82,7 +82,7 @@ public boolean equals(Object obj)
{
if (this == obj)
return true;
- if (obj instanceof MemoryTransportProtocol that)
+ if (obj instanceof MemoryTransport that)
return Objects.equals(connector, that.connector);
return false;
}
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/AbstractTransportProtocolTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/AbstractTransportTest.java
similarity index 97%
rename from jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/AbstractTransportProtocolTest.java
rename to jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/AbstractTransportTest.java
index 052296db4cf2..c4b1713bb999 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/AbstractTransportProtocolTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/AbstractTransportTest.java
@@ -26,7 +26,7 @@
import org.junit.jupiter.api.extension.ExtendWith;
@ExtendWith(WorkDirExtension.class)
-public abstract class AbstractTransportProtocolTest
+public abstract class AbstractTransportTest
{
protected Server server;
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/CustomTransportProtocolTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/CustomTransportTest.java
similarity index 95%
rename from jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/CustomTransportProtocolTest.java
rename to jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/CustomTransportTest.java
index 02ad1e4c5401..ed8e2b9c4837 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/CustomTransportProtocolTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/CustomTransportTest.java
@@ -35,7 +35,7 @@
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.MemoryEndPointPipe;
-import org.eclipse.jetty.io.TransportProtocol;
+import org.eclipse.jetty.io.Transport;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.HttpConnectionFactory;
import org.eclipse.jetty.server.Request;
@@ -67,7 +67,7 @@
* Remote Server (SSH) - - > In-Memory Gateway -> Response Bytes -> Remote MemoryEndPoint -> HttpClient -> Proxy -> Client
* }
*/
-public class CustomTransportProtocolTest
+public class CustomTransportTest
{
private static final String CONTENT = "CONTENT";
@@ -97,7 +97,7 @@ public void dispose()
}
@Test
- public void testCustomTransportProtocol() throws Exception
+ public void testCustomTransport() throws Exception
{
Gateway gateway = new Gateway();
@@ -109,7 +109,7 @@ public void testCustomTransportProtocol() throws Exception
public boolean handle(Request request, Response response, Callback callback)
{
var gatewayRequest = httpClient.newRequest("http://localhost/")
- .transportProtocol(new GatewayTransportProtocol(httpClient.getScheduler(), gateway))
+ .transport(new GatewayTransport(httpClient.getScheduler(), gateway))
.method(request.getMethod())
.path(request.getHttpURI().getPathQuery())
.timeout(5, TimeUnit.SECONDS);
@@ -164,12 +164,12 @@ public boolean handle(Request request, Response response, Callback callback)
assertThat(response.getContentAsString(), is(CONTENT));
}
- private static class GatewayTransportProtocol implements TransportProtocol
+ private static class GatewayTransport implements Transport
{
private final Scheduler scheduler;
private final Gateway gateway;
- private GatewayTransportProtocol(Scheduler scheduler, Gateway gateway)
+ private GatewayTransport(Scheduler scheduler, Gateway gateway)
{
this.scheduler = scheduler;
this.gateway = gateway;
@@ -195,8 +195,8 @@ public void connect(SocketAddress socketAddress, Map context)
ClientConnector clientConnector = (ClientConnector)context.get(ClientConnector.CLIENT_CONNECTOR_CONTEXT_KEY);
localEndPoint.setIdleTimeout(clientConnector.getIdleTimeout().toMillis());
- TransportProtocol transportProtocol = (TransportProtocol)context.get(TransportProtocol.class.getName());
- Connection connection = transportProtocol.newConnection(localEndPoint, context);
+ Transport transport = (Transport)context.get(Transport.class.getName());
+ Connection connection = transport.newConnection(localEndPoint, context);
localEndPoint.setConnection(connection);
localEndPoint.onOpen();
@@ -219,7 +219,7 @@ public boolean equals(Object obj)
{
if (this == obj)
return true;
- if (obj instanceof GatewayTransportProtocol that)
+ if (obj instanceof GatewayTransport that)
return Objects.equals(gateway, that.gateway);
return false;
}
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTP1TransportProtocolTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTP1TransportTest.java
similarity index 86%
rename from jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTP1TransportProtocolTest.java
rename to jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTP1TransportTest.java
index e5025b9fbde6..a403cf1eb145 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTP1TransportProtocolTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTP1TransportTest.java
@@ -25,14 +25,14 @@
import org.eclipse.jetty.http.HttpScheme;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.io.ClientConnector;
-import org.eclipse.jetty.io.TransportProtocol;
+import org.eclipse.jetty.io.Transport;
import org.eclipse.jetty.quic.client.ClientQuicConfiguration;
-import org.eclipse.jetty.quic.client.QuicTransportProtocol;
+import org.eclipse.jetty.quic.client.QuicTransport;
import org.eclipse.jetty.quic.server.QuicServerConnector;
import org.eclipse.jetty.quic.server.ServerQuicConfiguration;
import org.eclipse.jetty.server.HttpConnectionFactory;
import org.eclipse.jetty.server.MemoryConnector;
-import org.eclipse.jetty.server.MemoryTransportProtocol;
+import org.eclipse.jetty.server.MemoryTransport;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.toolchain.test.MavenPaths;
import org.eclipse.jetty.toolchain.test.jupiter.WorkDir;
@@ -46,7 +46,7 @@
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.sameInstance;
-public class HTTP1TransportProtocolTest extends AbstractTransportProtocolTest
+public class HTTP1TransportTest extends AbstractTransportTest
{
private HttpClient httpClient;
@@ -63,7 +63,7 @@ public void prepare()
}
@Test
- public void testDefaultTransportProtocol() throws Exception
+ public void testDefaultTransport() throws Exception
{
ServerConnector connector = new ServerConnector(server, 1, 1, new HttpConnectionFactory());
server.addConnector(connector);
@@ -79,7 +79,7 @@ public void testDefaultTransportProtocol() throws Exception
List destinations = httpClient.getDestinations();
assertThat(destinations.size(), is(1));
Destination destination = destinations.get(0);
- assertThat(destination.getOrigin().getTransportProtocol(), sameInstance(TransportProtocol.TCP_IP));
+ assertThat(destination.getOrigin().getTransport(), sameInstance(Transport.TCP_IP));
HttpClientTransportOverHTTP httpClientTransport = (HttpClientTransportOverHTTP)httpClient.getTransport();
int networkConnections = httpClientTransport.getClientConnector().getSelectorManager().getTotalKeys();
@@ -87,7 +87,7 @@ public void testDefaultTransportProtocol() throws Exception
}
@Test
- public void testExplicitTransportProtocol() throws Exception
+ public void testExplicitTransport() throws Exception
{
ServerConnector connector = new ServerConnector(server, 1, 1, new HttpConnectionFactory());
server.addConnector(connector);
@@ -95,7 +95,7 @@ public void testExplicitTransportProtocol() throws Exception
server.start();
ContentResponse response = httpClient.newRequest("localhost", connector.getLocalPort())
- .transportProtocol(TransportProtocol.TCP_IP)
+ .transport(Transport.TCP_IP)
.timeout(5, TimeUnit.SECONDS)
.send();
@@ -103,7 +103,7 @@ public void testExplicitTransportProtocol() throws Exception
}
@Test
- public void testMemoryTransportProtocol() throws Exception
+ public void testMemoryTransport() throws Exception
{
MemoryConnector connector = new MemoryConnector(server, new HttpConnectionFactory());
server.addConnector(connector);
@@ -111,7 +111,7 @@ public void testMemoryTransportProtocol() throws Exception
server.start();
ContentResponse response = httpClient.newRequest("http://localhost/")
- .transportProtocol(new MemoryTransportProtocol(connector))
+ .transport(new MemoryTransport(connector))
.timeout(5, TimeUnit.SECONDS)
.send();
@@ -123,7 +123,7 @@ public void testMemoryTransportProtocol() throws Exception
}
@Test
- public void testUnixDomainTransportProtocol() throws Exception
+ public void testUnixDomainTransport() throws Exception
{
UnixDomainServerConnector connector = new UnixDomainServerConnector(server, 1, 1, new HttpConnectionFactory());
connector.setUnixDomainPath(newUnixDomainPath());
@@ -132,7 +132,7 @@ public void testUnixDomainTransportProtocol() throws Exception
server.start();
ContentResponse response = httpClient.newRequest("http://localhost/")
- .transportProtocol(new TransportProtocol.TCPUnix(connector.getUnixDomainPath()))
+ .transport(new Transport.TCPUnix(connector.getUnixDomainPath()))
.timeout(5, TimeUnit.SECONDS)
.send();
@@ -140,7 +140,7 @@ public void testUnixDomainTransportProtocol() throws Exception
}
@Test
- public void testQUICTransportProtocol(WorkDir workDir) throws Exception
+ public void testQUICTransport(WorkDir workDir) throws Exception
{
SslContextFactory.Server sslServer = new SslContextFactory.Server();
sslServer.setKeyStorePath(MavenPaths.findTestResourceFile("keystore.p12").toString());
@@ -162,7 +162,7 @@ public void testQUICTransportProtocol(WorkDir workDir) throws Exception
server.start();
ContentResponse response = httpClient.newRequest("localhost", connector.getLocalPort())
- .transportProtocol(new QuicTransportProtocol(clientQuicConfig))
+ .transport(new QuicTransport(clientQuicConfig))
.scheme(HttpScheme.HTTPS.asString())
.timeout(5, TimeUnit.SECONDS)
.send();
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTP2TransportProtocolTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTP2TransportTest.java
similarity index 89%
rename from jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTP2TransportProtocolTest.java
rename to jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTP2TransportTest.java
index 1c31be7a80da..b44963701dd7 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTP2TransportProtocolTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTP2TransportTest.java
@@ -38,13 +38,13 @@
import org.eclipse.jetty.http2.server.HTTP2CServerConnectionFactory;
import org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory;
import org.eclipse.jetty.io.ClientConnector;
-import org.eclipse.jetty.io.TransportProtocol;
+import org.eclipse.jetty.io.Transport;
import org.eclipse.jetty.quic.client.ClientQuicConfiguration;
-import org.eclipse.jetty.quic.client.QuicTransportProtocol;
+import org.eclipse.jetty.quic.client.QuicTransport;
import org.eclipse.jetty.quic.server.QuicServerConnector;
import org.eclipse.jetty.quic.server.ServerQuicConfiguration;
import org.eclipse.jetty.server.MemoryConnector;
-import org.eclipse.jetty.server.MemoryTransportProtocol;
+import org.eclipse.jetty.server.MemoryTransport;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.toolchain.test.MavenPaths;
import org.eclipse.jetty.toolchain.test.jupiter.WorkDir;
@@ -59,7 +59,7 @@
import static org.hamcrest.Matchers.sameInstance;
import static org.junit.jupiter.api.Assertions.assertTrue;
-public class HTTP2TransportProtocolTest extends AbstractTransportProtocolTest
+public class HTTP2TransportTest extends AbstractTransportTest
{
private HttpClient httpClient;
private HTTP2Client http2Client;
@@ -78,7 +78,7 @@ public void prepare()
}
@Test
- public void testDefaultTransportProtocol() throws Exception
+ public void testDefaultTransport() throws Exception
{
ServerConnector connector = new ServerConnector(server, 1, 1, new HTTP2CServerConnectionFactory());
server.addConnector(connector);
@@ -94,7 +94,7 @@ public void testDefaultTransportProtocol() throws Exception
List destinations = httpClient.getDestinations();
assertThat(destinations.size(), is(1));
Destination destination = destinations.get(0);
- assertThat(destination.getOrigin().getTransportProtocol(), sameInstance(TransportProtocol.TCP_IP));
+ assertThat(destination.getOrigin().getTransport(), sameInstance(Transport.TCP_IP));
HttpClientTransportOverHTTP2 httpClientTransport = (HttpClientTransportOverHTTP2)httpClient.getTransport();
int networkConnections = httpClientTransport.getHTTP2Client().getClientConnector().getSelectorManager().getTotalKeys();
@@ -102,7 +102,7 @@ public void testDefaultTransportProtocol() throws Exception
}
@Test
- public void testExplicitTransportProtocol() throws Exception
+ public void testExplicitTransport() throws Exception
{
ServerConnector connector = new ServerConnector(server, 1, 1, new HTTP2CServerConnectionFactory());
server.addConnector(connector);
@@ -110,7 +110,7 @@ public void testExplicitTransportProtocol() throws Exception
server.start();
ContentResponse response = httpClient.newRequest("localhost", connector.getLocalPort())
- .transportProtocol(TransportProtocol.TCP_IP)
+ .transport(Transport.TCP_IP)
.timeout(5, TimeUnit.SECONDS)
.send();
@@ -118,7 +118,7 @@ public void testExplicitTransportProtocol() throws Exception
}
@Test
- public void testMemoryTransportProtocol() throws Exception
+ public void testMemoryTransport() throws Exception
{
MemoryConnector connector = new MemoryConnector(server, new HTTP2CServerConnectionFactory());
server.addConnector(connector);
@@ -126,7 +126,7 @@ public void testMemoryTransportProtocol() throws Exception
server.start();
ContentResponse response = httpClient.newRequest("http://localhost/")
- .transportProtocol(new MemoryTransportProtocol(connector))
+ .transport(new MemoryTransport(connector))
.timeout(5, TimeUnit.SECONDS)
.send();
@@ -138,7 +138,7 @@ public void testMemoryTransportProtocol() throws Exception
}
@Test
- public void testUnixDomainTransportProtocol() throws Exception
+ public void testUnixDomainTransport() throws Exception
{
UnixDomainServerConnector connector = new UnixDomainServerConnector(server, 1, 1, new HTTP2CServerConnectionFactory());
connector.setUnixDomainPath(newUnixDomainPath());
@@ -147,7 +147,7 @@ public void testUnixDomainTransportProtocol() throws Exception
server.start();
ContentResponse response = httpClient.newRequest("http://localhost/")
- .transportProtocol(new TransportProtocol.TCPUnix(connector.getUnixDomainPath()))
+ .transport(new Transport.TCPUnix(connector.getUnixDomainPath()))
.timeout(5, TimeUnit.SECONDS)
.send();
@@ -155,7 +155,7 @@ public void testUnixDomainTransportProtocol() throws Exception
}
@Test
- public void testQUICTransportProtocolWithH2C(WorkDir workDir) throws Exception
+ public void testQUICTransportWithH2C(WorkDir workDir) throws Exception
{
SslContextFactory.Server sslServer = new SslContextFactory.Server();
sslServer.setKeyStorePath(MavenPaths.findTestResourceFile("keystore.p12").toString());
@@ -177,7 +177,7 @@ public void testQUICTransportProtocolWithH2C(WorkDir workDir) throws Exception
server.start();
ContentResponse response = httpClient.newRequest("localhost", connector.getLocalPort())
- .transportProtocol(new QuicTransportProtocol(clientQuicConfig))
+ .transport(new QuicTransport(clientQuicConfig))
.timeout(5, TimeUnit.SECONDS)
.send();
@@ -185,7 +185,7 @@ public void testQUICTransportProtocolWithH2C(WorkDir workDir) throws Exception
}
@Test
- public void testQUICTransportProtocolWithH2(WorkDir workDir) throws Exception
+ public void testQUICTransportWithH2(WorkDir workDir) throws Exception
{
SslContextFactory.Server sslServer = new SslContextFactory.Server();
sslServer.setKeyStorePath(MavenPaths.findTestResourceFile("keystore.p12").toString());
@@ -210,7 +210,7 @@ public void testQUICTransportProtocolWithH2(WorkDir workDir) throws Exception
server.start();
ContentResponse response = httpClient.newRequest("localhost", connector.getLocalPort())
- .transportProtocol(new QuicTransportProtocol(clientQuicConfig))
+ .transport(new QuicTransport(clientQuicConfig))
.scheme(HttpScheme.HTTPS.asString())
.timeout(5, TimeUnit.SECONDS)
.send();
@@ -253,7 +253,7 @@ public void testLowLevelH2COverMemory() throws Exception
server.setHandler(new EmptyServerHandler());
server.start();
- Session session = http2Client.connect(new MemoryTransportProtocol(connector), null, connector.getLocalSocketAddress(), new Session.Listener() {}).get(5, TimeUnit.SECONDS);
+ Session session = http2Client.connect(new MemoryTransport(connector), null, connector.getLocalSocketAddress(), new Session.Listener() {}).get(5, TimeUnit.SECONDS);
CountDownLatch responseLatch = new CountDownLatch(1);
MetaData.Request request = new MetaData.Request("GET", HttpURI.from("http://localhost/"), HttpVersion.HTTP_2, HttpFields.EMPTY);
@@ -280,7 +280,7 @@ public void testLowLevelH2COverUnixDomain() throws Exception
server.setHandler(new EmptyServerHandler());
server.start();
- Session session = http2Client.connect(new TransportProtocol.TCPUnix(connector.getUnixDomainPath()), null, connector.getLocalSocketAddress(), new Session.Listener() {}).get(5, TimeUnit.SECONDS);
+ Session session = http2Client.connect(new Transport.TCPUnix(connector.getUnixDomainPath()), null, connector.getLocalSocketAddress(), new Session.Listener() {}).get(5, TimeUnit.SECONDS);
CountDownLatch responseLatch = new CountDownLatch(1);
MetaData.Request request = new MetaData.Request("GET", HttpURI.from("http://localhost/"), HttpVersion.HTTP_2, HttpFields.EMPTY);
@@ -322,7 +322,7 @@ public void testLowLevelH2COverQUIC(WorkDir workDir) throws Exception
server.start();
SocketAddress socketAddress = new InetSocketAddress("localhost", connector.getLocalPort());
- Session session = http2Client.connect(new QuicTransportProtocol(clientQuicConfig), null, socketAddress, new Session.Listener() {}).get(5, TimeUnit.SECONDS);
+ Session session = http2Client.connect(new QuicTransport(clientQuicConfig), null, socketAddress, new Session.Listener() {}).get(5, TimeUnit.SECONDS);
CountDownLatch responseLatch = new CountDownLatch(1);
MetaData.Request request = new MetaData.Request("GET", HttpURI.from("http://localhost/"), HttpVersion.HTTP_2, HttpFields.EMPTY);
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTP3TransportProtocolTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTP3TransportTest.java
similarity index 87%
rename from jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTP3TransportProtocolTest.java
rename to jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTP3TransportTest.java
index 9e8e9aeea57d..8d020b0aeae0 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTP3TransportProtocolTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTP3TransportTest.java
@@ -35,14 +35,14 @@
import org.eclipse.jetty.http3.frames.HeadersFrame;
import org.eclipse.jetty.http3.server.HTTP3ServerConnectionFactory;
import org.eclipse.jetty.io.ClientConnector;
-import org.eclipse.jetty.io.TransportProtocol;
+import org.eclipse.jetty.io.Transport;
import org.eclipse.jetty.quic.client.ClientQuicConfiguration;
-import org.eclipse.jetty.quic.client.QuicTransportProtocol;
+import org.eclipse.jetty.quic.client.QuicTransport;
import org.eclipse.jetty.quic.server.QuicServerConnectionFactory;
import org.eclipse.jetty.quic.server.QuicServerConnector;
import org.eclipse.jetty.quic.server.ServerQuicConfiguration;
import org.eclipse.jetty.server.MemoryConnector;
-import org.eclipse.jetty.server.MemoryTransportProtocol;
+import org.eclipse.jetty.server.MemoryTransport;
import org.eclipse.jetty.toolchain.test.MavenPaths;
import org.eclipse.jetty.toolchain.test.jupiter.WorkDir;
import org.eclipse.jetty.util.ssl.SslContextFactory;
@@ -56,7 +56,7 @@
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assumptions.assumeTrue;
-public class HTTP3TransportProtocolTest extends AbstractTransportProtocolTest
+public class HTTP3TransportTest extends AbstractTransportTest
{
private SslContextFactory.Server sslServer;
private Path pemServerDir;
@@ -86,7 +86,7 @@ public void prepare(WorkDir workDir) throws Exception
}
@Test
- public void testDefaultTransportProtocol() throws Exception
+ public void testDefaultTransport() throws Exception
{
ServerQuicConfiguration serverQuicConfig = new ServerQuicConfiguration(sslServer, pemServerDir);
QuicServerConnector connector = new QuicServerConnector(server, serverQuicConfig, new HTTP3ServerConnectionFactory(serverQuicConfig));
@@ -103,10 +103,10 @@ public void testDefaultTransportProtocol() throws Exception
List destinations = httpClient.getDestinations();
assertThat(destinations.size(), is(1));
Destination destination = destinations.get(0);
- TransportProtocol transportProtocol = destination.getOrigin().getTransportProtocol();
- if (transportProtocol instanceof TransportProtocol.Wrapper wrapper)
- transportProtocol = wrapper.unwrap();
- assertThat(transportProtocol, sameInstance(TransportProtocol.UDP_IP));
+ Transport transport = destination.getOrigin().getTransport();
+ if (transport instanceof Transport.Wrapper wrapper)
+ transport = wrapper.unwrap();
+ assertThat(transport, sameInstance(Transport.UDP_IP));
HttpClientTransportOverHTTP3 httpClientTransport = (HttpClientTransportOverHTTP3)httpClient.getTransport();
int networkConnections = httpClientTransport.getHTTP3Client().getClientConnector().getSelectorManager().getTotalKeys();
@@ -114,7 +114,7 @@ public void testDefaultTransportProtocol() throws Exception
}
@Test
- public void testExplicitTransportProtocol() throws Exception
+ public void testExplicitTransport() throws Exception
{
ServerQuicConfiguration serverQuicConfig = new ServerQuicConfiguration(sslServer, pemServerDir);
QuicServerConnector connector = new QuicServerConnector(server, serverQuicConfig, new HTTP3ServerConnectionFactory(serverQuicConfig));
@@ -123,7 +123,7 @@ public void testExplicitTransportProtocol() throws Exception
server.start();
ContentResponse response = httpClient.newRequest("localhost", connector.getLocalPort())
- .transportProtocol(new QuicTransportProtocol(http3Client.getQuicConfiguration()))
+ .transport(new QuicTransport(http3Client.getQuicConfiguration()))
.timeout(5, TimeUnit.SECONDS)
.send();
@@ -131,7 +131,7 @@ public void testExplicitTransportProtocol() throws Exception
}
@Test
- public void testMemoryTransportProtocol() throws Exception
+ public void testMemoryTransport() throws Exception
{
ServerQuicConfiguration quicConfiguration = new ServerQuicConfiguration(sslServer, pemServerDir);
QuicServerConnectionFactory quic = new QuicServerConnectionFactory(quicConfiguration);
@@ -142,7 +142,7 @@ public void testMemoryTransportProtocol() throws Exception
server.start();
ContentResponse response = httpClient.newRequest("http://localhost/")
- .transportProtocol(new QuicTransportProtocol(new MemoryTransportProtocol(connector), http3Client.getQuicConfiguration()))
+ .transport(new QuicTransport(new MemoryTransport(connector), http3Client.getQuicConfiguration()))
.timeout(5, TimeUnit.SECONDS)
.send();
@@ -154,7 +154,7 @@ public void testMemoryTransportProtocol() throws Exception
}
@Test
- public void testUnixDomainTransportProtocol()
+ public void testUnixDomainTransport()
{
noUnixDomainForDatagramChannel();
}
@@ -198,8 +198,8 @@ public void testLowLevelH3OverMemory() throws Exception
server.setHandler(new EmptyServerHandler());
server.start();
- TransportProtocol transportProtocol = new QuicTransportProtocol(new MemoryTransportProtocol(connector), http3Client.getQuicConfiguration());
- Session.Client session = http3Client.connect(transportProtocol, connector.getLocalSocketAddress(), new Session.Client.Listener() {}, null).get(5, TimeUnit.SECONDS);
+ Transport transport = new QuicTransport(new MemoryTransport(connector), http3Client.getQuicConfiguration());
+ Session.Client session = http3Client.connect(transport, connector.getLocalSocketAddress(), new Session.Client.Listener() {}, null).get(5, TimeUnit.SECONDS);
CountDownLatch responseLatch = new CountDownLatch(1);
MetaData.Request request = new MetaData.Request("GET", HttpURI.from("http://localhost/"), HttpVersion.HTTP_3, HttpFields.EMPTY);
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTPDynamicTransportProtocolTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTPDynamicTransportTest.java
similarity index 95%
rename from jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTPDynamicTransportProtocolTest.java
rename to jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTPDynamicTransportTest.java
index 0326949896b7..4fa820bcc601 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTPDynamicTransportProtocolTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HTTPDynamicTransportTest.java
@@ -47,9 +47,9 @@
import org.eclipse.jetty.http3.server.HTTP3ServerConnectionFactory;
import org.eclipse.jetty.io.ClientConnector;
import org.eclipse.jetty.io.Content;
-import org.eclipse.jetty.io.TransportProtocol;
+import org.eclipse.jetty.io.Transport;
import org.eclipse.jetty.quic.client.ClientQuicConfiguration;
-import org.eclipse.jetty.quic.client.QuicTransportProtocol;
+import org.eclipse.jetty.quic.client.QuicTransport;
import org.eclipse.jetty.quic.server.QuicServerConnectionFactory;
import org.eclipse.jetty.quic.server.QuicServerConnector;
import org.eclipse.jetty.quic.server.ServerQuicConfiguration;
@@ -58,7 +58,7 @@
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.HttpConnectionFactory;
import org.eclipse.jetty.server.MemoryConnector;
-import org.eclipse.jetty.server.MemoryTransportProtocol;
+import org.eclipse.jetty.server.MemoryTransport;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.Response;
import org.eclipse.jetty.server.ServerConnector;
@@ -80,7 +80,7 @@
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
-public class HTTPDynamicTransportProtocolTest extends AbstractTransportProtocolTest
+public class HTTPDynamicTransportTest extends AbstractTransportTest
{
private SslContextFactory.Server sslServer;
private Path pemServerDir;
@@ -380,7 +380,7 @@ public void testHighLevelH1OverUNIX() throws Exception
server.start();
ContentResponse response = httpClient.newRequest("localhost", tcp.getLocalPort())
- .transportProtocol(new TransportProtocol.TCPUnix(unixDomainPath))
+ .transport(new Transport.TCPUnix(unixDomainPath))
.timeout(5, TimeUnit.SECONDS)
.send();
@@ -409,9 +409,9 @@ public void testLowLevelH2OverUNIX() throws Exception
server.start();
- TransportProtocol.TCPUnix transportProtocol = new TransportProtocol.TCPUnix(unixDomainPath);
+ Transport.TCPUnix transport = new Transport.TCPUnix(unixDomainPath);
Promise.Completable promise = new Promise.Completable<>();
- http2Client.connect(transportProtocol, null, new HTTP2ClientConnectionFactory(), new Session.Listener() {}, promise, null);
+ http2Client.connect(transport, null, new HTTP2ClientConnectionFactory(), new Session.Listener() {}, promise, null);
Session session = promise.get(5, TimeUnit.SECONDS);
CountDownLatch responseLatch = new CountDownLatch(1);
@@ -445,7 +445,7 @@ public void testHighLevelH1OverMemory() throws Exception
server.start();
ContentResponse response = httpClient.newRequest("http://localhost/")
- .transportProtocol(new MemoryTransportProtocol(local))
+ .transport(new MemoryTransport(local))
.timeout(5, TimeUnit.SECONDS)
.send();
@@ -476,10 +476,10 @@ public void testHighLevelH2OverQUIC(WorkDir workDir) throws Exception
server.start();
ClientQuicConfiguration clientQuicConfiguration = new ClientQuicConfiguration(sslClient, null);
- QuicTransportProtocol transportProtocol = new QuicTransportProtocol(clientQuicConfiguration);
+ QuicTransport transport = new QuicTransport(clientQuicConfiguration);
ContentResponse response = httpClient.newRequest("localhost", connector.getLocalPort())
- .transportProtocol(transportProtocol)
+ .transport(transport)
.timeout(5, TimeUnit.SECONDS)
.send();
@@ -508,10 +508,10 @@ public void testHighLevelH3OverMemory(WorkDir workDir) throws Exception
server.start();
- TransportProtocol transportProtocol = new QuicTransportProtocol(new MemoryTransportProtocol(connector), http3Client.getQuicConfiguration());
+ Transport transport = new QuicTransport(new MemoryTransport(connector), http3Client.getQuicConfiguration());
ContentResponse response = httpClient.newRequest("https://localhost/")
- .transportProtocol(transportProtocol)
+ .transport(transport)
.timeout(5, TimeUnit.SECONDS)
.send();
diff --git a/jetty-core/jetty-unixdomain-server/src/test/java/org/eclipse/jetty/unixdomain/server/UnixDomainTest.java b/jetty-core/jetty-unixdomain-server/src/test/java/org/eclipse/jetty/unixdomain/server/UnixDomainTest.java
index 24d230bb9405..65fa6b8b9e39 100644
--- a/jetty-core/jetty-unixdomain-server/src/test/java/org/eclipse/jetty/unixdomain/server/UnixDomainTest.java
+++ b/jetty-core/jetty-unixdomain-server/src/test/java/org/eclipse/jetty/unixdomain/server/UnixDomainTest.java
@@ -30,7 +30,7 @@
import org.eclipse.jetty.http.HttpURI;
import org.eclipse.jetty.io.ClientConnector;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.TransportProtocol;
+import org.eclipse.jetty.io.Transport;
import org.eclipse.jetty.server.ConnectionFactory;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.HttpConnectionFactory;
@@ -159,14 +159,14 @@ public boolean handle(Request request, Response response, Callback callback)
new Origin.Address("localhost", fakeProxyPort),
null,
new Origin.Protocol(List.of("http/1.1"), false),
- new TransportProtocol.TCPUnix(unixDomainPath)
+ new Transport.TCPUnix(unixDomainPath)
);
httpClient.getProxyConfiguration().addProxy(new HttpProxy(proxyOrigin, null));
httpClient.start();
try
{
ContentResponse response = httpClient.newRequest("localhost", fakeServerPort)
- .transportProtocol(new TransportProtocol.TCPUnix(unixDomainPath))
+ .transport(new Transport.TCPUnix(unixDomainPath))
.timeout(5, TimeUnit.SECONDS)
.send();
@@ -222,7 +222,7 @@ else if ("/v2".equals(target))
// Try PROXYv1 with the PROXY information retrieved from the EndPoint.
// PROXYv1 does not support the UNIX family.
ContentResponse response1 = httpClient.newRequest("localhost", 0)
- .transportProtocol(new TransportProtocol.TCPUnix(unixDomainPath))
+ .transport(new Transport.TCPUnix(unixDomainPath))
.path("/v1")
.tag(new V1.Tag())
.timeout(5, TimeUnit.SECONDS)
@@ -233,7 +233,7 @@ else if ("/v2".equals(target))
// Try PROXYv2 with explicit PROXY information.
var tag = new V2.Tag(V2.Tag.Command.PROXY, V2.Tag.Family.UNIX, V2.Tag.Protocol.STREAM, srcAddr, 0, dstAddr, 0, null);
ContentResponse response2 = httpClient.newRequest("localhost", 0)
- .transportProtocol(new TransportProtocol.TCPUnix(unixDomainPath))
+ .transport(new Transport.TCPUnix(unixDomainPath))
.path("/v2")
.tag(tag)
.timeout(5, TimeUnit.SECONDS)
diff --git a/jetty-ee10/jetty-ee10-fcgi-proxy/src/main/java/org/eclipse/jetty/ee10/fcgi/proxy/FastCGIProxyServlet.java b/jetty-ee10/jetty-ee10-fcgi-proxy/src/main/java/org/eclipse/jetty/ee10/fcgi/proxy/FastCGIProxyServlet.java
index b6762bdb5dd6..cca9ac8bf13e 100644
--- a/jetty-ee10/jetty-ee10-fcgi-proxy/src/main/java/org/eclipse/jetty/ee10/fcgi/proxy/FastCGIProxyServlet.java
+++ b/jetty-ee10/jetty-ee10-fcgi-proxy/src/main/java/org/eclipse/jetty/ee10/fcgi/proxy/FastCGIProxyServlet.java
@@ -39,7 +39,7 @@
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.HttpScheme;
import org.eclipse.jetty.io.ClientConnector;
-import org.eclipse.jetty.io.TransportProtocol;
+import org.eclipse.jetty.io.Transport;
import org.eclipse.jetty.util.ProcessorUtils;
/**
@@ -217,7 +217,7 @@ protected void sendProxyRequest(HttpServletRequest request, HttpServletResponse
Path unixDomain = unixDomainPath;
if (unixDomain != null)
- proxyRequest.transportProtocol(new TransportProtocol.TCPUnix(unixDomain));
+ proxyRequest.transport(new Transport.TCPUnix(unixDomain));
super.sendProxyRequest(request, proxyResponse, proxyRequest);
}
diff --git a/jetty-ee9/jetty-ee9-fcgi-proxy/src/main/java/org/eclipse/jetty/ee9/fcgi/proxy/FastCGIProxyServlet.java b/jetty-ee9/jetty-ee9-fcgi-proxy/src/main/java/org/eclipse/jetty/ee9/fcgi/proxy/FastCGIProxyServlet.java
index 103e31f8303e..5b07c578f25c 100644
--- a/jetty-ee9/jetty-ee9-fcgi-proxy/src/main/java/org/eclipse/jetty/ee9/fcgi/proxy/FastCGIProxyServlet.java
+++ b/jetty-ee9/jetty-ee9-fcgi-proxy/src/main/java/org/eclipse/jetty/ee9/fcgi/proxy/FastCGIProxyServlet.java
@@ -39,7 +39,7 @@
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.HttpScheme;
import org.eclipse.jetty.io.ClientConnector;
-import org.eclipse.jetty.io.TransportProtocol;
+import org.eclipse.jetty.io.Transport;
import org.eclipse.jetty.util.ProcessorUtils;
/**
@@ -217,7 +217,7 @@ protected void sendProxyRequest(HttpServletRequest request, HttpServletResponse
Path unixDomain = unixDomainPath;
if (unixDomain != null)
- proxyRequest.transportProtocol(new TransportProtocol.TCPUnix(unixDomain));
+ proxyRequest.transport(new Transport.TCPUnix(unixDomain));
super.sendProxyRequest(request, proxyResponse, proxyRequest);
}
diff --git a/tests/test-distribution/test-distribution-common/src/test/java/org/eclipse/jetty/tests/distribution/DistributionTests.java b/tests/test-distribution/test-distribution-common/src/test/java/org/eclipse/jetty/tests/distribution/DistributionTests.java
index 8d1a0dca7e14..d477b1c6f8a6 100644
--- a/tests/test-distribution/test-distribution-common/src/test/java/org/eclipse/jetty/tests/distribution/DistributionTests.java
+++ b/tests/test-distribution/test-distribution-common/src/test/java/org/eclipse/jetty/tests/distribution/DistributionTests.java
@@ -54,7 +54,7 @@
import org.eclipse.jetty.http3.client.transport.HttpClientTransportOverHTTP3;
import org.eclipse.jetty.io.ClientConnector;
import org.eclipse.jetty.io.Content;
-import org.eclipse.jetty.io.TransportProtocol;
+import org.eclipse.jetty.io.Transport;
import org.eclipse.jetty.io.content.ByteBufferContentSource;
import org.eclipse.jetty.quic.client.ClientQuicConfiguration;
import org.eclipse.jetty.tests.testers.JettyHomeTester;
@@ -998,7 +998,7 @@ public void testUnixDomain() throws Exception
client = new HttpClient(new HttpClientTransportDynamic(connector, HttpClientConnectionFactory.HTTP11));
client.start();
ContentResponse response = client.newRequest("http://localhost/path")
- .transportProtocol(new TransportProtocol.TCPUnix(path))
+ .transport(new Transport.TCPUnix(path))
.send();
assertEquals(HttpStatus.NOT_FOUND_404, response.getStatus());
}