Class AttributeDirectives

    • Constructor Detail

      • AttributeDirectives

        public AttributeDirectives()
    • Method Detail

      • attribute

        public <T> RouteAdapter attribute​(AttributeKey<T> key,
                                          java.util.function.Function<T,​Route> inner)
        Extracts the value of the request attribute with the given key. If no attribute is found the request is rejected with a MissingAttributeRejection.
        Parameters:
        key - (undocumented)
        inner - (undocumented)
        Returns:
        (undocumented)
      • optionalAttribute

        public <T> RouteAdapter optionalAttribute​(AttributeKey<T> key,
                                                  java.util.function.Function<java.util.Optional<T>,​Route> inner)
        Extracts the value of the optional request attribute with the given key.
        Parameters:
        key - (undocumented)
        inner - (undocumented)
        Returns:
        (undocumented)