10Duke Scale SDK for Java
|
A TendukeScaleConfig
implementation that provides a stacked approach for supporting a multi-source configuration.
To define a stacked configuration instance that terminates the recursion use: the single arg constructor OR call only the fluent variant withPriorityConfig
without a further call to withFallbackConfig
.
Public Member Functions | |
TendukeScaleConfigWithFallback (final TendukeScaleConfig config, final TendukeScaleConfig fallback) | |
Creates a new TendukeScaleConfig with the given configuration instance taking priority and with the given fallback configuration instance. | |
TendukeScaleConfigWithFallback | withConfig (final TendukeScaleConfig config) |
Sets the configuration instance to use as priority in the stack. | |
TendukeScaleConfigWithFallback | withFallbackConfig (final TendukeScaleConfig config) |
Sets the configuration instance to use as a fallback in the stack. | |
URI | licensingApiUrl () |
Protocol and host name for the 10Duke API base URL. | |
Optional< String > | licensingApiAuthorizationModel () |
Method of authorization used for API calls. | |
![]() |
Protected Member Functions | |
TendukeScaleConfig | getTendukeScaleConfig () |
Gets the primary config and makes sure its type is TendukeScaleConfig. | |
TendukeScaleConfig | getTendukeScaleFallbackConfig () |
Gets the fallback config and makes sure its type is TendukeScaleConfig. | |
Additional Inherited Members | |
![]() | |
String | LICENSING_API_JWKS_URLS_PATH = "/licensing-signing-keys/.well-known/jwks.json" |
URL path to read public key used to verify JWTs received from the API: /licensing-signing-keys/.well-known/jwks.json . | |
tenduke.scale.api.config.TendukeScaleConfigWithFallback.TendukeScaleConfigWithFallback | ( | final TendukeScaleConfig | config, |
final TendukeScaleConfig | fallback ) |
Creates a new TendukeScaleConfig
with the given configuration instance taking priority and with the given fallback configuration instance.
config | The first level configuration instance. |
fallback | The fallback configuration to use if the first level configuration does not provide a value. If fallback == null then a MinViableTendukeScaleConfig is created as the fallback configuration. For fallback == null the priority configuration instance must be able to provide a value for licensingApiUrl() . |
|
protected |
Gets the primary config and makes sure its type is TendukeScaleConfig.
Note: this method throws an internal error if the primary config instance is of wrong type.
|
protected |
Gets the fallback config and makes sure its type is TendukeScaleConfig.
Optional< String > tenduke.scale.api.config.TendukeScaleConfigWithFallback.licensingApiAuthorizationModel | ( | ) |
Method of authorization used for API calls.
empty
, which works for license key based API authorization. Implements tenduke.scale.api.config.TendukeScaleConfig.
URI tenduke.scale.api.config.TendukeScaleConfigWithFallback.licensingApiUrl | ( | ) |
Protocol and host name for the 10Duke API base URL.
Implements tenduke.scale.api.config.TendukeScaleConfig.
TendukeScaleConfigWithFallback tenduke.scale.api.config.TendukeScaleConfigWithFallback.withConfig | ( | final TendukeScaleConfig | config | ) |
Sets the configuration instance to use as priority in the stack.
config | The priority configuration to use first. |
TendukeScaleConfigWithFallback tenduke.scale.api.config.TendukeScaleConfigWithFallback.withFallbackConfig | ( | final TendukeScaleConfig | config | ) |
Sets the configuration instance to use as a fallback in the stack.
config | The fallback configuration to use only if the configuration with priority does not provide a value. Note: a not null value is required. |