public class LotlFetchingProperties extends Object
| Constructor and Description |
|---|
LotlFetchingProperties(IOnFailingCountryLotlData countryFetchFailureStrategy)
Creates an instance of
LotlFetchingProperties. |
| Modifier and Type | Method and Description |
|---|---|
long |
getCacheStalenessInMilliseconds()
Get the cache staleness threshold value in milliseconds.
|
IOnFailingCountryLotlData |
getOnCountryFetchFailureStrategy()
Gets the strategy to be used when fetching a country specific LOTL fails.
|
LongUnaryOperator |
getRefreshIntervalCalculator()
Gets the calculation function for the cache refresh interval.
|
LotlFetchingProperties |
setCacheStalenessInMilliseconds(long stalenessInMillis)
Sets the allowed staleness of cached EU trusted list entries in milliseconds.
|
LotlFetchingProperties |
setCountryNames(String... countryNames)
Adds schema name (usually two letters) of a country which shall be used during LOTL fetching.
|
LotlFetchingProperties |
setCountryNamesToIgnore(String... countryNamesToIgnore)
Adds schema name (usually two letters) of a country which shall be ignored during LOTL fetching.
|
LotlFetchingProperties |
setRefreshIntervalCalculator(LongUnaryOperator refreshIntervalCalculator)
Sets a custom cache refresh timer function.
|
LotlFetchingProperties |
setServiceTypes(String... serviceType)
Adds service type identifier which shall be used during country specific LOTL fetching.
|
public LotlFetchingProperties(IOnFailingCountryLotlData countryFetchFailureStrategy)
LotlFetchingProperties.
See IOnFailingCountryLotlData for more details.countryFetchFailureStrategy - strategy to be used when fetching of a country specific LOTL failspublic LotlFetchingProperties setCountryNames(String... countryNames)
This method cannot be used together with setCountryNamesToIgnore(String...).
If no schema names are added or ignored, all country specific LOTL files will be used.
Most of the country names are present in LotlCountryCodeConstants class.
countryNames - schema names of countries to useLotlFetchingProperties instancepublic LotlFetchingProperties setCountryNamesToIgnore(String... countryNamesToIgnore)
This method cannot be used together with setCountryNames(String...).
If no schema names are added or ignored, all country specific LOTL files will be used.
Most of the country names are present in LotlCountryCodeConstants class.
countryNamesToIgnore - countries to ignoreLotlFetchingProperties instancepublic long getCacheStalenessInMilliseconds()
public LotlFetchingProperties setCacheStalenessInMilliseconds(long stalenessInMillis)
This value determines how long the cached EU trusted lists certificates will be considered
valid to be used in the signatures validation if they are not updated. The cached entries are attempted
to be updated regularly according to setRefreshIntervalCalculator(LongUnaryOperator) configuration.
If the update fails for some reason and the configured staleness threshold for the cached entry is
eventually reached then the IOnFailingCountryLotlData strategy instance provided in the
LotlFetchingProperties(IOnFailingCountryLotlData) will be invoked.
The default value is 24 hours (24 * 60 * 60 * 1000 milliseconds).
You can set this property to positive infinity in order to never consider the certificates stale and to keep
using them in validation even if they are not updated. Consider updating the
setRefreshIntervalCalculator(LongUnaryOperator) to return static value in this case though.
See IOnFailingCountryLotlData for more details.
stalenessInMillis - the staleness time in millisecondsLotlFetchingProperties instancepublic LongUnaryOperator getRefreshIntervalCalculator()
This function will be used to determine the refresh interval based on the staleness time. By default, it takes 70% of the staleness time as the refresh interval.
public LotlFetchingProperties setRefreshIntervalCalculator(LongUnaryOperator refreshIntervalCalculator)
By default, it takes 23% of the staleness time as the refresh interval. So if the staleness time is 24 hours, the refresh interval will be set to 5.52 hours.
refreshIntervalCalculator - a function that takes the staleness time in milliseconds and returns the refresh
interval in milliseconds.LotlFetchingProperties instancepublic IOnFailingCountryLotlData getOnCountryFetchFailureStrategy()
public LotlFetchingProperties setServiceTypes(String... serviceType)
If no service type identifiers are added,
all service types from ServiceTypeIdentifiersConstants will be used.
Only values supported by this logic are predefined in ServiceTypeIdentifiersConstants.
serviceType - service type identifier as a StringLotlFetchingProperties instanceCopyright © 1998–2025 Apryse Group NV. All rights reserved.