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

More utilities to get ports in DropwizardConnectors #450

Closed
sleberknight opened this issue Apr 24, 2024 · 0 comments · Fixed by #452
Closed

More utilities to get ports in DropwizardConnectors #450

sleberknight opened this issue Apr 24, 2024 · 0 comments · Fixed by #452
Assignees
Labels
new feature A new feature such as a new class, method, package, group of classes, etc.
Milestone

Comments

@sleberknight
Copy link
Member

Add new methods to DropwizardConnectors that make it easy to get port information for application, admin, or all connectors.

These methods can assume (and therefore require) that the ServerFactory be a io.dropwizard.core.server.DefaultServerFactory. This restriction should be documented.

Users should be able to supply an io.dropwizard.core.Configuration or a io.dropwizard.core.server.DefaultServerFactory, which implies method overloads.

Methods that accept a Configuration should be designed such that we could change the implementation to handle both DefaultServerFactory and io.dropwizard.core.server.SimpleServerFactory it it ever becomes necessary. In that case, we could add more methods that mirror the existing ones, but which accept SimpleServerFactory and always return Port instances that have org.kiwiproject.registry.model.PortType of APPLICATION (since SimpleServerFactory only permits a single application port). The methods accepting Configuration could then be refactored to delegate to the appropriate methods based on the ServerFactory type.

@sleberknight sleberknight added the new feature A new feature such as a new class, method, package, group of classes, etc. label Apr 24, 2024
@sleberknight sleberknight added this to the 3.5.0 milestone Apr 24, 2024
@sleberknight sleberknight self-assigned this Apr 24, 2024
sleberknight added a commit that referenced this issue Apr 25, 2024
Add several utility methods to get application and/or admin ports from either a Dropwizard
Configuration or DefaultServerFactory.

Closes #450
sleberknight added a commit that referenced this issue Apr 25, 2024
Add several utility methods to get application and/or admin ports from either a Dropwizard
Configuration or DefaultServerFactory.

Also, add scheme() method to ConnectoType enum to get the scheme (http or https).

Closes #450
Closes #453
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature A new feature such as a new class, method, package, group of classes, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant