Enum CacheControlStrategy

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<CacheControlStrategy>

    public enum CacheControlStrategy
    extends java.lang.Enum<CacheControlStrategy>
    The strategy which defines the way HttpSource will know about whether the underlying resource was changed.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ETAG
      Ressor will use ETag header as a version snapshot of the resource.
      ETAG_HEAD
      Same as IF-MODIFIED-SINCE, but for servers which doesn't support If-Modified-Since header.
      IF_MODIFIED_SINCE
      Ressor will use Last-Modified header as a version snapshot of the resource.
      LAST_MODIFIED_HEAD
      Same as ETAG, but for servers which doesn't support If-None-Match header.
      NONE
      Always reload the resource on every poll.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static CacheControlStrategy valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static CacheControlStrategy[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • ETAG

        public static final CacheControlStrategy ETAG
        Ressor will use ETag header as a version snapshot of the resource. It will send the If-None-Match header with the last version value in order to receive only the modified body.
      • IF_MODIFIED_SINCE

        public static final CacheControlStrategy IF_MODIFIED_SINCE
        Ressor will use Last-Modified header as a version snapshot of the resource. It will send the If-Modified-Since header with the last version value in order to receive only the modified body.
      • LAST_MODIFIED_HEAD

        public static final CacheControlStrategy LAST_MODIFIED_HEAD
        Same as ETAG, but for servers which doesn't support If-None-Match header. Must support HEAD requests.
      • ETAG_HEAD

        public static final CacheControlStrategy ETAG_HEAD
        Same as IF-MODIFIED-SINCE, but for servers which doesn't support If-Modified-Since header. Must support HEAD requests.
    • Method Detail

      • values

        public static CacheControlStrategy[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (CacheControlStrategy c : CacheControlStrategy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CacheControlStrategy valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null