Package org.digidoc4j
Interface TSLRefreshCallback
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DefaultTSLRefreshCallback
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A callback for ensuring the state of the TSL after a refresh.
The callback is encouraged to throw an exception, if the TSL is not usable,
in order to stop the processes early that triggered the TSL refresh.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
ensureTSLState
(eu.europa.esig.dss.spi.tsl.TLValidationJobSummary summary) Ensures the state of the TSL and either: throws an appropriate exception if the TSL is not in a usable state and the process that triggered the TSL refresh may not continue returnsfalse
, if the process that triggered the TSL refresh may continue, but the time of the TSL refresh must not be updated - the TSL is marked as expired returnstrue
, if the TSL is good and the time of the TSL refresh must be updated - the next automatic TSL refresh will not be triggered before the next expiration period is over (seeConfiguration.setTslCacheExpirationTime(long)
)
-
Method Details
-
ensureTSLState
boolean ensureTSLState(eu.europa.esig.dss.spi.tsl.TLValidationJobSummary summary) Ensures the state of the TSL and either:- throws an appropriate exception if the TSL is not in a usable state and the process that triggered the TSL refresh may not continue
- returns
false
, if the process that triggered the TSL refresh may continue, but the time of the TSL refresh must not be updated - the TSL is marked as expired - returns
true
, if the TSL is good and the time of the TSL refresh must be updated - the next automatic TSL refresh will not be triggered before the next expiration period is over (seeConfiguration.setTslCacheExpirationTime(long)
)
- Parameters:
summary
- the information about the state of the TSL- Returns:
true
if the TSL refresh time must be updated,false
otherwise
-