Interface ResponseCreationSupport.MaxAgeCalculator

All Known Implementing Classes:
ResponseCreationSupport.DefaultMaxAgeCalculator
Enclosing class:
ResponseCreationSupport
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

Describes a calculator for the max-age property.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    maxAge(HttpRequest request, MediaType mediaType)
    Calculate a max age value for a response using the given request and the media type of the repsonse.
  • Method Details

    • maxAge

      int maxAge(HttpRequest request, MediaType mediaType)
      Calculate a max age value for a response using the given request and the media type of the repsonse.
      Parameters:
      request - the request, usually only the URI is considered for the calculation
      mediaType - the media type of the response
      Returns:
      the max age value to be used in the response