Interface AsyncApiVersionResolver

All Superinterfaces:
ApiVersionResolver
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface AsyncApiVersionResolver extends ApiVersionResolver
Extension of ApiVersionResolver for implementations that resolve the version in an asynchronous way.
Since:
7.0.3
Author:
Rossen Stoyanchev, Jonathan Kaplan
  • Method Summary

    Modifier and Type
    Method
    Description
    resolveVersion(org.springframework.web.server.ServerWebExchange exchange)
    Resolve the version for the given exchange.
    resolveVersionAsync(org.springframework.web.server.ServerWebExchange exchange)
    Resolve the version for the given exchange.
  • Method Details

    • resolveVersionAsync

      Mono<String> resolveVersionAsync(org.springframework.web.server.ServerWebExchange exchange)
      Resolve the version for the given exchange.
      Parameters:
      exchange - the current exchange
      Returns:
      Mono emitting the version value, or an empty Mono
    • resolveVersion

      default @Nullable String resolveVersion(org.springframework.web.server.ServerWebExchange exchange)
      Description copied from interface: ApiVersionResolver
      Resolve the version for the given exchange.

      Implementations of this method are expected to be non-blocking. If you need to resolve the version asynchronously, please implement the AsyncApiVersionResolver subinterface instead.

      Specified by:
      resolveVersion in interface ApiVersionResolver
      Parameters:
      exchange - the current exchange
      Returns:
      the version value, or null if not found