Interface ETagFactory

All Known Implementing Classes:
ETagFactoryDefault

public interface ETagFactory
Factory for ETags
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a strong ETag, using a specific tag.
    create(String tag, boolean isWeak)
    Creates a strong or weak ETag, using a specific tag.
    create(String tag, boolean isWeak, boolean isWildcard)
    Creates a strong or weak ETag, using a specific tag.
    Creates an ETag object from an already formatted ETag header.
  • Method Details

    • create

      ETag create(String tag)
      Creates a strong ETag, using a specific tag. THis tag will be used as is to generate the ETag header value.
      Parameters:
      eTag - the tag to use.
    • create

      ETag create(String tag, boolean isWeak)
      Creates a strong or weak ETag, using a specific tag. THis tag will be used as is to generate the ETag header value.
      Parameters:
      eTag - the tag to use.
      isWeak - is the ETag weak?
    • create

      ETag create(String tag, boolean isWeak, boolean isWildcard)
      Creates a strong or weak ETag, using a specific tag. THis tag will be used as is to generate the ETag header value.
      Parameters:
      eTag - the tag to use.
      isWeak - is the ETag weak?
      isWildcard - is the ETag a wildcard? If so, the 'tag' must be "*" or be empty.
    • deserializeHeaderValue

      ETag deserializeHeaderValue(String etagHeader)
      Creates an ETag object from an already formatted ETag header.
      Parameters:
      etagHeader - the value of the ETag header. Or an already formatted ETag String.
      Throws:
      an - exception is thrown if the value is invalid.