java.lang.Object
org.springframework.cloud.servicebroker.autoconfigure.web.reactive.ApiVersionWebFilter
All Implemented Interfaces:
WebFilter

public class ApiVersionWebFilter extends Object implements WebFilter
WebFilter that configures checking for an appropriate service broker API version.
Author:
Roy Clarkson
  • Constructor Details

    • ApiVersionWebFilter

      public ApiVersionWebFilter()
      Construct a filter that disables API version validation.
    • ApiVersionWebFilter

      public ApiVersionWebFilter(BrokerApiVersion version)
      Construct a filter that validates the API version passed in request headers to the configured version.
      Parameters:
      version - the API version supported by the broker.
  • Method Details

    • filter

      public reactor.core.publisher.Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain)
      Process the web request and validate the API version in the header. If the API version does not match, then set an HTTP 412 status and write the error message to the response.
      Specified by:
      filter in interface WebFilter
      Parameters:
      exchange -
      chain -
      Returns: