Class CacheConditionDirectives

java.lang.Object
akka.http.javadsl.server.directives.BasicDirectives
akka.http.javadsl.server.directives.CacheConditionDirectives
Direct Known Subclasses:
CodingDirectives

public abstract class CacheConditionDirectives extends BasicDirectives
  • Constructor Details

    • CacheConditionDirectives

      public CacheConditionDirectives()
  • Method Details

    • conditional

      public Route conditional(EntityTag eTag, Supplier<Route> inner)
      Wraps its inner route with support for Conditional Requests as defined by http://tools.ietf.org/html/rfc7232

      In particular the algorithm defined by http://tools.ietf.org/html/rfc7232#section-6 is implemented by this directive.

      Note: if you want to combine this directive with withRangeSupport(...) you need to put it on the *outside* of the withRangeSupport(...) directive, i.e. withRangeSupport(...) must be on a deeper level in your route structure in order to function correctly.

      Parameters:
      eTag - (undocumented)
      inner - (undocumented)
      Returns:
      (undocumented)
    • conditional

      public Route conditional(DateTime lastModified, Supplier<Route> inner)
      Wraps its inner route with support for Conditional Requests as defined by http://tools.ietf.org/html/rfc7232

      In particular the algorithm defined by http://tools.ietf.org/html/rfc7232#section-6 is implemented by this directive.

      Note: if you want to combine this directive with withRangeSupport(...) you need to put it on the *outside* of the withRangeSupport(...) directive, i.e. withRangeSupport(...) must be on a deeper level in your route structure in order to function correctly.

      Parameters:
      lastModified - (undocumented)
      inner - (undocumented)
      Returns:
      (undocumented)
    • conditional

      public Route conditional(EntityTag eTag, DateTime lastModified, Supplier<Route> inner)
      Wraps its inner route with support for Conditional Requests as defined by http://tools.ietf.org/html/rfc7232

      In particular the algorithm defined by http://tools.ietf.org/html/rfc7232#section-6 is implemented by this directive.

      Note: if you want to combine this directive with withRangeSupport(...) you need to put it on the *outside* of the withRangeSupport(...) directive, i.e. withRangeSupport(...) must be on a deeper level in your route structure in order to function correctly.

      Parameters:
      eTag - (undocumented)
      lastModified - (undocumented)
      inner - (undocumented)
      Returns:
      (undocumented)
    • conditional

      public Route conditional(Optional<EntityTag> eTag, Optional<DateTime> lastModified, Supplier<Route> inner)
      Wraps its inner route with support for Conditional Requests as defined by http://tools.ietf.org/html/rfc7232

      In particular the algorithm defined by http://tools.ietf.org/html/rfc7232#section-6 is implemented by this directive.

      Note: if you want to combine this directive with withRangeSupport(...) you need to put it on the *outside* of the withRangeSupport(...) directive, i.e. withRangeSupport(...) must be on a deeper level in your route structure in order to function correctly.

      Parameters:
      eTag - (undocumented)
      lastModified - (undocumented)
      inner - (undocumented)
      Returns:
      (undocumented)