Class FileBasedFallbackResolver

java.lang.Object
org.frontcache.resilience.fr.FileBasedFallbackResolver
All Implemented Interfaces:
FallbackResolver

public class FileBasedFallbackResolver extends Object implements FallbackResolver
  • Field Details

  • Constructor Details

    • FileBasedFallbackResolver

      public FileBasedFallbackResolver()
  • Method Details

    • init

      public void init(FcHttpClient client)
      Specified by:
      init in interface FallbackResolver
    • getFallbackEntries

      public Set<FallbackConfigEntry> getFallbackEntries()
      A copy, not the live entries: these go out over the management API, and the returned objects are plain FallbackConfigEntry rather than the FallbackConfigEntryImpl used internally so the compiled Pattern does not have to serialize. LinkedHashSet because the order is the matching order - first match wins - which is what makes the console's list readable as the rule sequence it actually is.
      Specified by:
      getFallbackEntries in interface FallbackResolver
      Returns:
      the configured fallback entries, for display in the console. Order matters: it is the order they are matched in, first match wins.
    • getFallback

      public WebResponse getFallback(String fallbackSource, String urlStr)
      Specified by:
      getFallback in interface FallbackResolver