Interface RequestPredicates.Visitor

Enclosing class:
RequestPredicates

public static interface RequestPredicates.Visitor
Receives notifications from the logical structure of request predicates.
Since:
5.2
Author:
Arjen Poutsma, Sam Brannen
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    and()
    Receive "middle" notification of a logical AND predicate.
    void
    Receive last notification of a logical AND predicate.
    void
    Receive last notification of a negated predicate.
    void
    Receive last notification of a logical OR predicate.
    void
    header(String name, String value)
    Receive notification of an HTTP header predicate.
    void
    method(Set<org.springframework.http.HttpMethod> methods)
    Receive notification of an HTTP method predicate.
    void
    or()
    Receive "middle" notification of a logical OR predicate.
    void
    param(String name, String value)
    Receive notification of a parameter predicate.
    void
    path(String pattern)
    Receive notification of a path predicate.
    void
    pathExtension(String extension)
    Deprecated, for removal: This API element is subject to removal in a future version.
    without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers).
    void
    Receive first notification of a logical AND predicate.
    void
    Receive first notification of a negated predicate.
    void
    Receive first notification of a logical OR predicate.
    void
    Receive first notification of an unknown predicate.
    void
    version(String version)
    Receive notification of an API version predicate.
  • Method Details

    • method

      void method(Set<org.springframework.http.HttpMethod> methods)
      Receive notification of an HTTP method predicate.
      Parameters:
      methods - the HTTP methods that make up the predicate
      See Also:
    • path

      void path(String pattern)
      Receive notification of a path predicate.
      Parameters:
      pattern - the path pattern that makes up the predicate
      See Also:
    • pathExtension

      @Deprecated(since="7.0", forRemoval=true) void pathExtension(String extension)
      Deprecated, for removal: This API element is subject to removal in a future version.
      without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179
      Receive notification of a path extension predicate.
      Parameters:
      extension - the path extension that makes up the predicate
      See Also:
    • header

      void header(String name, String value)
      Receive notification of an HTTP header predicate.
      Parameters:
      name - the name of the HTTP header to check
      value - the desired value of the HTTP header
      See Also:
    • param

      void param(String name, String value)
      Receive notification of a parameter predicate.
      Parameters:
      name - the name of the parameter
      value - the desired value of the parameter
      See Also:
    • version

      void version(String version)
      Receive notification of an API version predicate. The version could be fixed ("1.2") or baseline ("1.2+").
      Parameters:
      version - the configured version
      Since:
      7.0
    • startAnd

      void startAnd()
      Receive first notification of a logical AND predicate. The first subsequent notification will contain the left-hand side of the AND-predicate; followed by and(), followed by the right-hand side, followed by endAnd().
      See Also:
    • and

      void and()
      Receive "middle" notification of a logical AND predicate. The following notification contains the right-hand side, followed by endAnd().
      See Also:
    • endAnd

      void endAnd()
      Receive last notification of a logical AND predicate.
      See Also:
    • startOr

      void startOr()
      Receive first notification of a logical OR predicate. The first subsequent notification will contain the left-hand side of the OR-predicate; the second notification contains the right-hand side, followed by endOr().
      See Also:
    • or

      void or()
      Receive "middle" notification of a logical OR predicate. The following notification contains the right-hand side, followed by endOr().
      See Also:
    • endOr

      void endOr()
      Receive last notification of a logical OR predicate.
      See Also:
    • startNegate

      void startNegate()
      Receive first notification of a negated predicate. The first subsequent notification will contain the negated predicated, followed by endNegate().
      See Also:
    • endNegate

      void endNegate()
      Receive last notification of a negated predicate.
      See Also:
    • unknown

      void unknown(RequestPredicate predicate)
      Receive first notification of an unknown predicate.