Class ReactiveLoadBalancerApiVersionStrategy

java.lang.Object
org.springframework.web.reactive.accept.DefaultApiVersionStrategy
org.springframework.cloud.loadbalancer.core.ReactiveLoadBalancerApiVersionStrategy
All Implemented Interfaces:
org.springframework.web.reactive.accept.ApiVersionStrategy

public class ReactiveLoadBalancerApiVersionStrategy extends org.springframework.web.reactive.accept.DefaultApiVersionStrategy
A LoadBalancer-specific implementation of DefaultApiVersionStrategy. It overrides the DefaultApiVersionStrategy.validateVersion(Comparable, ServerWebExchange) method in order to skip any version validation.
Since:
5.0.0
Author:
Olga Maciaszek-Sharma
  • Constructor Summary

    Constructors
    Constructor
    Description
    ReactiveLoadBalancerApiVersionStrategy(List<org.springframework.web.reactive.accept.ApiVersionResolver> versionResolvers, @Nullable org.springframework.web.accept.ApiVersionParser<?> versionParser, boolean versionRequired, @Nullable String defaultVersion, boolean detectSupportedVersions, @Nullable Predicate<Comparable<?>> supportedVersionPredicate, @Nullable org.springframework.web.reactive.accept.ApiVersionDeprecationHandler deprecationHandler)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    validateVersion(@Nullable Comparable<?> requestVersion, org.springframework.web.server.ServerWebExchange exchange)
     

    Methods inherited from class org.springframework.web.reactive.accept.DefaultApiVersionStrategy

    addMappedVersion, addSupportedVersion, detectSupportedVersions, getDefaultVersion, handleDeprecations, parseVersion, resolveVersion, toString

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.springframework.web.reactive.accept.ApiVersionStrategy

    resolveParseAndValidateVersion
  • Constructor Details

    • ReactiveLoadBalancerApiVersionStrategy

      public ReactiveLoadBalancerApiVersionStrategy(List<org.springframework.web.reactive.accept.ApiVersionResolver> versionResolvers, @Nullable org.springframework.web.accept.ApiVersionParser<?> versionParser, boolean versionRequired, @Nullable String defaultVersion, boolean detectSupportedVersions, @Nullable Predicate<Comparable<?>> supportedVersionPredicate, @Nullable org.springframework.web.reactive.accept.ApiVersionDeprecationHandler deprecationHandler)
  • Method Details

    • validateVersion

      public void validateVersion(@Nullable Comparable<?> requestVersion, org.springframework.web.server.ServerWebExchange exchange) throws org.springframework.web.accept.MissingApiVersionException, org.springframework.web.accept.InvalidApiVersionException
      Specified by:
      validateVersion in interface org.springframework.web.reactive.accept.ApiVersionStrategy
      Overrides:
      validateVersion in class org.springframework.web.reactive.accept.DefaultApiVersionStrategy
      Throws:
      org.springframework.web.accept.MissingApiVersionException
      org.springframework.web.accept.InvalidApiVersionException