Package org.apache.sling.api.servlets
Interface JakartaOptingServlet
- All Superinterfaces:
jakarta.servlet.Servlet
- All Known Implementing Classes:
JavaxToJakartaServletWrapper.JavaxToJakartaOptingServletWrapper
@ConsumerType
public interface JakartaOptingServlet
extends jakarta.servlet.Servlet
The
JakartaOptingServlet interface may be implemented by
Servlets used 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 cause
accepts(org.apache.sling.api.SlingJakartaHttpServletRequest) to return true.-
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepts(@NotNull SlingJakartaHttpServletRequest request) Examines the request, and returntrueif this servlet is willing to handle the request.Methods inherited from interface jakarta.servlet.Servlet
destroy, getServletConfig, getServletInfo, init, service
-
Method Details
-
accepts
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
-