org.springframework.web.reactive.result

Class HandlerResultHandlerSupport

  • java.lang.Object
    • org.springframework.web.reactive.result.HandlerResultHandlerSupport
    • Field Detail

      • logger

        protected final Log logger
    • Method Detail

      • setOrder

        public void setOrder(int order)
        Set the order for this result handler relative to others.

        By default set to Ordered.LOWEST_PRECEDENCE, however see Javadoc of sub-classes which may change this default.

        Parameters:
        order - the order
      • getOrder

        public int getOrder()
        Description copied from interface: Ordered
        Get the order value of this object.

        Higher values are interpreted as lower priority. As a consequence, the object with the lowest value has the highest priority (somewhat analogous to Servlet load-on-startup values).

        Same order values will result in arbitrary sort positions for the affected objects.

        Specified by:
        getOrder in interface Ordered
        Returns:
        the order value
        See Also:
        Ordered.HIGHEST_PRECEDENCE, Ordered.LOWEST_PRECEDENCE
      • selectMediaType

        @Nullable
        protected MediaType selectMediaType(ServerWebExchange exchange,
                                                      java.util.function.Supplier<java.util.List<MediaType>> producibleTypesSupplier)
        Select the best media type for the current request through a content negotiation algorithm.
        Parameters:
        exchange - the current request
        producibleTypesSupplier - the media types that can be produced for the current request
        Returns:
        the selected media type or null