Skip to content

Commit

Permalink
Enhance DynamicPortsConfiguration javadocs (#462)
Browse files Browse the repository at this point in the history
* Include the default values in the docs
* Add additional information about the min/max ports
* Add explanation that a valid TLS config is needed when using secure (HTTP) ports
  • Loading branch information
sleberknight authored Apr 26, 2024
1 parent 948327c commit f183d8e
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,31 +27,43 @@ public class DynamicPortsConfiguration {

/**
* Whether to assign ports randomly between {@code minDynamicPort} and {@code maxDynamicPort}.
* <p>
* The default value is true.
*/
private boolean useDynamicPorts;

/**
* Whether to start the service securely (require HTTPS connections to this service)
* when assigning ports dynamically, i.e., when {@code useDynamicPorts} is enabled.
* <p>
* The default value is true.
*/
private boolean useSecureDynamicPorts;

/**
* The lowest port that can be assigned when {@code useDynamicPorts} is enabled.
* <p>
* The default value is 1024 (the first port after the well-known ports).
*/
@Positive
@Max(DEFAULT_MAX_DYNAMIC_PORT)
private int minDynamicPort;

/**
* The highest port that can be assigned when {@code useDynamicPorts} is enabled.
* <p>
* The default value is 65353 (the highest available port).
*/
@Positive
@Max(DEFAULT_MAX_DYNAMIC_PORT)
private int maxDynamicPort;

/**
* Used when {@code useSecureDynamicPorts} is true (and using dynamic ports).
* <p>
* The default value is {@code null}, which will only work when using
* non-secure (HTTP) ports. Otherwise, a valid TLS configuration must
* be provided.
*/
@Nullable
@JsonProperty("tls")
Expand Down

0 comments on commit f183d8e

Please sign in to comment.