You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After looking into this more, I found that the PortAssigner really doesn't need a LocalPortChecker anymore, since the FreePortFinder is now responsible for finding ports. After release 3.9.0 when the FreePortFinder was added, the only time the LocalPortChecker is used is if the FreePortFinder is not specified when building a PortAssigner. In that case, the behavior in the constructor is to create a new RandomFreePortFinder instance and pass the LocalPortChecker to its constructor. Here is the relevant part of the constructor implementation:
But if a FreePortFinder is supplied to the PortAssigner builder, then the localPortChecker field is never used. This was an oversight when I added FreePortFinder, since the previous behavior was to use the localPortChecker when finding ports. Once that behavior was removed from PortAssigner, the localPortChecker field really serves no purpose anymore. As a result, we should remove it from PortAssigner. Note this will be a breaking API change and thus cause a major version bump to 4.0.0.
* Configure a FreePortFinder when creating the PortAssigner
inside DynamicPortsBundle.
* Remove LocalPortChecker from DynamicPortsConfiguration.
* Add FreePortFinder to DynamicPortsConfiguration.
* Remove LocalPortChecker from PortAssigner.
* Make FreePortFinder support Jackson's polymorphic deserialization
by adding JsonTypeInfo to FreePortFinder, adding JsonTypeName
annotation to the three FreePortFinder impls, and adding an
io.dropwizard.jackson.Discoverable in META-INF/services, plus
org.kiwiproject.dropwizard.util.startup.FreePortFinder also
in META-INF/services.
* Lots of test refactoring and new tests.
* Misc: fix Javadoc in StartupLockConfiguration
Closes#545Closes#546Closes#547
With the addition of #536 ,
PortAssigner
can accept aFreePortFinder
to determine how to find free ports.This task is to modify
DynamicPortsBundle
to permit assignment of aFreePortFinder
, which will need to be added toDynamicPortsConfiguration
.The text was updated successfully, but these errors were encountered: