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.

@FunctionalInterface public interface TSLRefreshCallback extends Serializable
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 Type
    Method
    Description
    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 (see Configuration.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 (see Configuration.setTslCacheExpirationTime(long))
      Parameters:
      summary - the information about the state of the TSL
      Returns:
      true if the TSL refresh time must be updated, false otherwise