Repository navigation
Remove engine.adapter and map Netty messages directly - #1538
Merged
Merged
Conversation
Collaborator
Author
|
Update: the full multi-module install ( |
This was referenced Oct 18, 2026
thboileau-git
approved these changes
Oct 19, 2026
The Netty connectors now build Restlet requests and responses directly from Netty messages, without the ServerCall/ClientCall and ServerAdapter/ ClientAdapter layer. - NettyServerHelper extends ServerHelper, NettyClientHelper extends ClientHelper (two fewer inheritance levels, Sonar S110). - NettyServerCall and the new NettyRequest take over ServerCall, ServerAdapter and HttpRequest: lazy header parsing, headers and version attributes, TLS client info, entity rules per status and method, ConnectorService callbacks. - NettyClientCall takes over ClientCall and ClientAdapter. - Removed the org.restlet.engine.adapter package and the "adapter" connector parameter (breaking change, 3.0). - Added Response.getProtocol()/setProtocol(): the HTTP client connector records the protocol version the server replied with (1.1, 2.0, 3.0). WrapperResponse delegates it; Response.toString() shows it. Signed-off-by: Jerome Louvel <374450+jlouvel@users.noreply.github.com>
jlouvel
force-pushed
the
feat/flatten-http-adapter
branch
from
October 20, 2026 12:39
d257cc8 to
7a15067
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Stacked on #1537 (base
feat/netty-connector). Part of 3.0 M2. This is a breaking change, with no deprecation step.Summary
The Netty connectors now build Restlet requests and responses directly from Netty messages. The
ServerCall/ClientCallandServerAdapter/ClientAdapterlayer is removed.NettyServerHelpernow extendsServerHelper, andNettyClientHelpernow extendsClientHelper. This removes two inheritance levels and should clear the remaining Sonar S110 issues on Replace Jetty with Netty in the core connectors (3.0 milestone 2) #1537.NettyServerCalland the new package-privateNettyRequestreplaceServerCall,ServerAdapter,HttpRequestandHttpResponse. They keep:org.restlet.http.headersandorg.restlet.http.versionattributes;X-Forwarded-Forsupport;ConnectorServicebefore-send and after-send callbacks.NettyClientCallreplacesClientCallandClientAdapter. Redirect handling inNettyClientHelperis unchanged.org.restlet.engine.adapterpackage and itsmodule-infoexport, and the"adapter"connector parameter.Response.getProtocol()andsetProtocol(). The HTTP client connector records the protocol version the server replied with (1.1, 2.0 or 3.0). When none was recorded,getProtocol()returns the request's protocol.WrapperResponsedelegates both methods, andResponse.toString()shows the protocol.changes.mdis updated (breaking-changes bullet and an enhancement).Behaviour notes
Tests
ResponseProtocolTestCase: HTTP/1.1 round trip, fallback to the request protocol on a connection error, wrapper delegation.Http2MultiplexingTestCaseandHttp3TestCasenow also check the protocol version on the client response.Known issue
ShutdownHookTestCasefailed in one core verify run. It checks shutdown timing to within ±200 ms. Run alone, it fails intermittently under load both with and without this change, so it was left out of the full-build run above.