Class ClientVersionMatcher

java.lang.Object
org.apache.juneau.rest.matcher.RestMatcher
org.apache.juneau.rest.matcher.ClientVersionMatcher

public class ClientVersionMatcher extends RestMatcher
Specialized matcher for matching client versions.
See Also:
  • Constructor Details

    • ClientVersionMatcher

      public ClientVersionMatcher(String clientVersionHeader, MethodInfo mi)
      Constructor.
      Parameters:
      clientVersionHeader - The HTTP request header name containing the client version. If null or an empty string, uses "Client-Version"
      mi - The version string that the client version must match.
  • Method Details

    • matches

      public boolean matches(jakarta.servlet.http.HttpServletRequest req)
      Description copied from class: RestMatcher
      Returns true if the specified request matches this matcher.
      Specified by:
      matches in class RestMatcher
      Parameters:
      req - The servlet request.
      Returns:
      true if the specified request matches this matcher.
    • required

      public boolean required()
      Description copied from class: RestMatcher
      Returns true if this matcher is required to match in order for the method to be invoked.

      If false, then only one of the matchers must match.

      Overrides:
      required in class RestMatcher
      Returns:
      true if this matcher is required to match in order for the method to be invoked.