Interface RequestPredicateVisitorAdapter

  • All Superinterfaces:
    java.lang.reflect.InvocationHandler
    All Known Implementing Classes:
    ConsumingWebEndpointMappingAdapter

    public interface RequestPredicateVisitorAdapter
    extends java.lang.reflect.InvocationHandler
    The adapter interface for RequestPredicates.Visitor
    Since:
    1.0.0
    Author:
    Mercy
    See Also:
    RequestPredicates.Visitor, RequestPredicate, RequestPredicates
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.reflect.Method ACCEPT_METHOD
      The Method of RequestPredicate.accept(RequestPredicates.Visitor)
      static java.lang.Class<?> VISITOR_CLASS
      The Class of RequestPredicates.Visitor
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void and()
      Receive "middle" notification of a logical AND predicate.
      default void endAnd()
      Receive last notification of a logical AND predicate.
      default void endNegate()
      Receive last notification of a negated predicate.
      default void endOr()
      Receive last notification of a logical OR predicate.
      default java.lang.Object getProxy()
      Get the proxy of RequestPredicates.Visitor since Spring 5.1
      default void header​(java.lang.String name, java.lang.String value)
      Receive notification of an HTTP header predicate.
      default java.lang.Object invoke​(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)  
      default boolean isVisitorSupported()  
      default void method​(java.util.Set<org.springframework.http.HttpMethod> methods)
      Receive notification of an HTTP method predicate.
      default void or()
      Receive "middle" notification of a logical OR predicate.
      default void path​(java.lang.String pattern)
      Receive notification of a path predicate.
      default void pathExtension​(java.lang.String extension)
      Receive notification of a path extension predicate.
      default void queryParam​(java.lang.String name, java.lang.String value)
      Receive notification of a query parameter predicate.
      default void startAnd()
      Receive first notification of a logical AND predicate.
      default void startNegate()
      Receive first notification of a negated predicate.
      default void startOr()
      Receive first notification of a logical OR predicate.
      default void unknown​(org.springframework.web.reactive.function.server.RequestPredicate predicate)
      Receive first notification of an unknown predicate.
      default void visit​(org.springframework.web.reactive.function.server.RequestPredicate predicate)
      Invoke RequestPredicate.accept(RequestPredicates.Visitor) in Java Reflection if the RequestPredicates.Visitor is supported, otherwise invoke RequestPredicateKind.acceptVisitor(RequestPredicate, RequestPredicateVisitorAdapter)
    • Field Detail

      • VISITOR_CLASS

        @Nullable
        static final java.lang.Class<?> VISITOR_CLASS
        The Class of RequestPredicates.Visitor
        Since:
        Spring Framework 5.1
        See Also:
        RequestPredicates.Visitor
      • ACCEPT_METHOD

        @Nullable
        static final java.lang.reflect.Method ACCEPT_METHOD
        The Method of RequestPredicate.accept(RequestPredicates.Visitor)
        Since:
        Spring Framework 5.1
    • Method Detail

      • method

        default void method​(java.util.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:
        RequestPredicates.method(HttpMethod), RequestPredicates.Visitor.method(Set)
      • path

        default void path​(java.lang.String pattern)
        Receive notification of a path predicate.
        Parameters:
        pattern - the path pattern that makes up the predicate
        See Also:
        RequestPredicates.path(String), RequestPredicates.Visitor.path(String)
      • pathExtension

        default void pathExtension​(java.lang.String extension)
        Receive notification of a path extension predicate.
        Parameters:
        extension - the path extension that makes up the predicate
        See Also:
        RequestPredicates.pathExtension(String), RequestPredicates.Visitor.pathExtension(String)
      • header

        default void header​(java.lang.String name,
                            java.lang.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:
        RequestPredicates.headers(Predicate), RequestPredicates.contentType(MediaType...), RequestPredicates.accept(MediaType...), RequestPredicates.Visitor.header(String, String)
      • queryParam

        default void queryParam​(java.lang.String name,
                                java.lang.String value)
        Receive notification of a query parameter predicate.
        Parameters:
        name - the name of the query parameter
        value - the desired value of the parameter
        See Also:
        RequestPredicates.queryParam(String, String), RequestPredicates.Visitor.queryParam(String, String)
      • startAnd

        default 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:
        RequestPredicate.and(RequestPredicate), RequestPredicates.Visitor.startAnd()
      • and

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

        default void endAnd()
        Receive last notification of a logical AND predicate.
        See Also:
        RequestPredicate.and(RequestPredicate), RequestPredicates.Visitor.endAnd()
      • startOr

        default 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:
        RequestPredicate.or(RequestPredicate), RequestPredicates.Visitor.startOr()
      • or

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

        default void endOr()
        Receive last notification of a logical OR predicate.
        See Also:
        RequestPredicate.or(RequestPredicate), RequestPredicates.Visitor.endOr()
      • startNegate

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

        default void endNegate()
        Receive last notification of a negated predicate.
        See Also:
        RequestPredicate.negate(), RequestPredicates.Visitor.endNegate()
      • unknown

        default void unknown​(org.springframework.web.reactive.function.server.RequestPredicate predicate)
        Receive first notification of an unknown predicate.
        See Also:
        RequestPredicates.Visitor.unknown(RequestPredicate)
      • isVisitorSupported

        default boolean isVisitorSupported()
      • getProxy

        default java.lang.Object getProxy()
        Get the proxy of RequestPredicates.Visitor since Spring 5.1
        Returns:
        null if RequestPredicates.Visitor is absent
      • invoke

        default java.lang.Object invoke​(java.lang.Object proxy,
                                        java.lang.reflect.Method method,
                                        java.lang.Object[] args)
                                 throws java.lang.Throwable
        Specified by:
        invoke in interface java.lang.reflect.InvocationHandler
        Throws:
        java.lang.Throwable
      • visit

        default void visit​(org.springframework.web.reactive.function.server.RequestPredicate predicate)
        Invoke RequestPredicate.accept(RequestPredicates.Visitor) in Java Reflection if the RequestPredicates.Visitor is supported, otherwise invoke RequestPredicateKind.acceptVisitor(RequestPredicate, RequestPredicateVisitorAdapter)
        Parameters:
        predicate - RequestPredicate
        See Also:
        RequestPredicate.accept(RequestPredicates.Visitor), RequestPredicateKind.acceptVisitor(RequestPredicate, RequestPredicateVisitorAdapter)