Enum Class OfflineModeConfiguration.Mode

java.lang.Object
java.lang.Enum<OfflineModeConfiguration.Mode>
pl.maciejkopec.offlinemode.config.OfflineModeConfiguration.Mode
All Implemented Interfaces:
Serializable, Comparable<OfflineModeConfiguration.Mode>, Constable
Enclosing class:
OfflineModeConfiguration

public static enum OfflineModeConfiguration.Mode extends Enum<OfflineModeConfiguration.Mode>
  • Enum Constant Details

    • LEARNING

      public static final OfflineModeConfiguration.Mode LEARNING
      Capture responses from the methods annotated with @OfflineMode annotation and save them under path folder
      See Also:
    • LEARNING_SKIP_EXISTING

      public static final OfflineModeConfiguration.Mode LEARNING_SKIP_EXISTING
      Capture responses from the methods annotated with @OfflineMode annotation and save them under path folder unless matching file already exists.
      See Also:
    • SERVING

      public static final OfflineModeConfiguration.Mode SERVING
      For methods annotated with @OfflineMode annotation the lookup for the file under path folder is performed. If there is matching file, the response is based on the content of this file. Otherwise, the underlying code will be executed.
      See Also:
  • Method Details

    • values

      public static OfflineModeConfiguration.Mode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static OfflineModeConfiguration.Mode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isLearningEnabled

      public static boolean isLearningEnabled(OfflineModeConfiguration.Mode mode)