Browse Source

SEC-1405: added RequestMatcher interface.

Luke Taylor 15 years ago
parent
commit
1ecd3e228b

+ 21 - 0
web/src/main/java/org/springframework/security/web/util/RequestMatcher.java

@@ -0,0 +1,21 @@
+package org.springframework.security.web.util;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * Simple strategy to match an <tt>HttpServletRequest</tt>.
+ *
+ * @author Luke Taylor
+ * @since 3.0.2
+ */
+public interface RequestMatcher {
+
+    /**
+     * Decides whether the rule implemented by the strategy matches the supplied request.
+     *
+     * @param request the request to check for a match
+     * @return true if the request matches, false otherwise
+     */
+    boolean matches(HttpServletRequest request);
+
+}