Issue #7109 - Deprecate UnixSocket JNR support. (#7110)

* Issue #7109 - Deprecate UnixSocket JNR support.

Deprecated for removal classes and JPMS modules.
Added [deprecated] sections and "deprecated" tag to Jetty module files.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2021-12-02 12:59:05 +01:00 committed by GitHub
parent 1ea012afde
commit cda45ae3ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 43 additions and 1 deletions

View File

@ -11,6 +11,7 @@
// ========================================================================
//
@Deprecated(forRemoval = true)
module org.eclipse.jetty.unixsocket.client
{
requires org.eclipse.jetty.unixsocket.common;

View File

@ -22,6 +22,7 @@ import java.nio.channels.SelectableChannel;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.SocketChannel;
import java.nio.file.Path;
import java.util.Map;
import java.util.concurrent.Executor;
@ -32,6 +33,7 @@ import org.eclipse.jetty.client.AbstractConnectorHttpClientTransport;
import org.eclipse.jetty.client.DuplexConnectionPool;
import org.eclipse.jetty.client.DuplexHttpDestination;
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.client.HttpClientTransport;
import org.eclipse.jetty.client.HttpDestination;
import org.eclipse.jetty.client.HttpRequest;
import org.eclipse.jetty.client.Origin;
@ -47,7 +49,10 @@ import org.eclipse.jetty.util.thread.Scheduler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
// TODO: this class needs a thorough review.
/**
* @deprecated use any {@link HttpClientTransport} with {@link ClientConnector#forUnixDomain(Path)} instead (requires Java 16 or later)
*/
@Deprecated(forRemoval = true)
public class HttpClientTransportOverUnixSockets extends AbstractConnectorHttpClientTransport
{
private static final Logger LOG = LoggerFactory.getLogger(HttpClientTransportOverUnixSockets.class);

View File

@ -11,6 +11,7 @@
// ========================================================================
//
@Deprecated(forRemoval = true)
module org.eclipse.jetty.unixsocket.common
{
requires org.slf4j;

View File

@ -23,6 +23,7 @@ import org.eclipse.jetty.util.thread.Scheduler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Deprecated(forRemoval = true)
public class UnixSocketEndPoint extends SocketChannelEndPoint
{
private static final Logger LOG = LoggerFactory.getLogger(UnixSocketEndPoint.class);

View File

@ -5,8 +5,13 @@ Adds a forwarded request customizer for the Unix Domain Socket connector.
For use when behind a proxy operating in HTTP mode that adds forwarded-for style HTTP headers.
Typically this is an alternate to the Proxy Protocol used mostly for TCP mode.
[deprecated]
Module 'unixsocket-forwarded' is deprecated for removal.
Use 'unixdomain-http' instead (requires Java 16 or later).
[tags]
connector
deprecated
[depend]
unixsocket-http

View File

@ -6,9 +6,14 @@ It should be used when a proxy is forwarding either HTTP or decrypted
HTTPS traffic to the connector and may be used with the
unix-socket-http2c modules to upgrade to HTTP/2.
[deprecated]
Module 'unixsocket-http' is deprecated for removal.
Use 'unixdomain-http' instead (requires Java 16 or later).
[tags]
connector
http
deprecated
[depend]
unixsocket

View File

@ -5,9 +5,14 @@ Adds an HTTP2C connetion factory to the Unix Domain Socket Connector.
It can be used when either the proxy forwards direct
HTTP/2C (unecrypted) or decrypted HTTP/2 traffic.
[deprecated]
Module 'unixsocket-http2c' is deprecated for removal.
Use 'unixdomain-http' instead (requires Java 16 or later).
[tags]
connector
http2
deprecated
[depend]
unixsocket-http

View File

@ -8,8 +8,13 @@ as they reduce data copies, avoid needless fragmentation and have better dispatc
When enabled with corresponding support modules, the connector can
accept HTTP, HTTPS or HTTP2C traffic.
[deprecated]
Module 'unixsocket' is deprecated for removal.
Use 'unixdomain-http' instead (requires Java 16 or later).
[tags]
connector
deprecated
[depend]
server

View File

@ -10,8 +10,13 @@ SSL properties may be interpreted by the unixsocket-secure
module to indicate secure HTTPS traffic. Typically this
is an alternate to the forwarded module.
[deprecated]
Module 'unixsocket-proxy-protocol' is deprecated for removal.
Use 'unixdomain-http' instead (requires Java 16 or later).
[tags]
connector
deprecated
[depend]
unixsocket

View File

@ -7,11 +7,16 @@ This looks for a secure scheme transported either by the
unixsocket-forwarded, unixsocket-proxy-protocol or in a
HTTP2 request.
[deprecated]
Module 'unixsocket-secure' is deprecated for removal.
Use 'unixdomain-http' instead (requires Java 16 or later).
[tags]
connector
[depend]
unixsocket-http
deprecated
[xml]
etc/jetty-unixsocket-secure.xml

View File

@ -11,6 +11,7 @@
// ========================================================================
//
@Deprecated(forRemoval = true)
module org.eclipse.jetty.unixsocket.server
{
requires org.slf4j;

View File

@ -50,7 +50,10 @@ import org.slf4j.LoggerFactory;
/**
* <p>A server-side connector for UNIX sockets.</p>
*
* @deprecated Use UnixDomainServerConnector from the jetty-unixdomain-server module instead (requires Java 16 or later).
*/
@Deprecated(forRemoval = true)
@ManagedObject("Connector using UNIX Socket")
public class UnixSocketConnector extends AbstractConnector
{