Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.x - named routing #7705

Merged
merged 1 commit into from Oct 3, 2023

Conversation

romain-grecourt
Copy link
Contributor

@romain-grecourt romain-grecourt commented Oct 3, 2023

Description

  • Add new .routing variants in WebServerConfig.Builder
  • Update LoomServer to use the new named routings
  • Update multiport example to use the new API
  • Fix multiport example README.md and dependencies (/observe and dependencies)

Fixes #7702


Documentation

One can now register routing for a named socket created via .config(config.get("server")).

Before:

server.routing(Main::publicRouting)
        // Add a set of routes on the named socket "admin"
        .putSocket("admin", socket -> socket.from(server.sockets().get("admin"))
                .routing(Main::adminSocket))
        // Add a set of routes on the named socket "private"
        .putSocket("private", socket -> socket.from(server.sockets().get("private"))
                .routing(Main::privateSocket));

After:

server.routing(Main::publicRouting)
        .routing("admin", Main::adminSocket)
        .routing("private", Main::privateSocket);

- Update WebServerConfigBlueprint and LoomServer
- Update multiport example to use the new API
- Fix multiport example README.md and dependencies (/observe and dependencies)

Fixes helidon-io#7702
@romain-grecourt romain-grecourt added this to the 4.0.0-RC2 milestone Oct 3, 2023
@romain-grecourt romain-grecourt self-assigned this Oct 3, 2023
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 3, 2023
@romain-grecourt romain-grecourt linked an issue Oct 3, 2023 that may be closed by this pull request
@barchetta barchetta modified the milestones: 4.0.0-RC2, 4.0.0 Oct 3, 2023
Copy link
Member

@tomas-langer tomas-langer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API looks much better. The only problem I can see is if somebody combines both methods (we may want to warn/throw an exception for such cases).

@romain-grecourt romain-grecourt merged commit bf22456 into helidon-io:main Oct 3, 2023
12 checks passed
@romain-grecourt romain-grecourt deleted the 4.x-named-routing branch October 3, 2023 23:39
dalexandrov pushed a commit to dalexandrov/helidon that referenced this pull request Oct 17, 2023
…7705)

- Update WebServerConfigBlueprint and LoomServer
- Update multiport example to use the new API
- Fix multiport example README.md and dependencies (/observe and dependencies)

Fixes helidon-io#7702
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4.x - Add ability to configure routing for an existing socket
3 participants