Package org.apache.sling.api.servlets
Interface OptingServlet
-
- All Superinterfaces:
javax.servlet.Servlet
- All Known Subinterfaces:
NonExistingResourceServlet
- All Known Implementing Classes:
NonExistingDispatcherServlet,ProxyServlet
@ConsumerType public interface OptingServlet extends javax.servlet.ServletTheOptingServletinterface may be implemented byServletsused by Sling which may choose to not handle all requests for which they would be selected based on their registration properties. Note that servlets implementing this interface can have an impact on system performance, as their resolution cannot be cached: the resolver has no insight into which parts of the request causeaccepts(org.apache.sling.api.SlingHttpServletRequest)to return true.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaccepts(@NotNull SlingHttpServletRequest request)Examines the request, and returntrueif this servlet is willing to handle the request.
-
-
-
Method Detail
-
accepts
boolean accepts(@NotNull @NotNull SlingHttpServletRequest request)Examines the request, and returntrueif this servlet is willing to handle the request. Iffalseis returned, the request will be ignored by this servlet, and may be handled by other servlets.- Parameters:
request- The request to examine- Returns:
trueif this servlet will handle the request,falseotherwise
-
-