Class ServletResourceType

  • All Implemented Interfaces:
    Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public class ServletResourceType
    extends javax.servlet.GenericServlet
    maps a Sling resource type to an existing servlet service implementation (e.g. for forwarding to webconsole plugins)
    See Also:
    Serialized Form
    • Constructor Detail

      • ServletResourceType

        public ServletResourceType()
    • Method Detail

      • isEnabled

        protected boolean isEnabled​(@NotNull
                                    @NotNull org.apache.sling.api.SlingHttpServletRequest request,
                                    @NotNull
                                    ServiceRestrictions.Permission needed)
      • wrapServlet

        protected ServletResourceType.ServletWrapper wrapServlet​(@NotNull
                                                                 @NotNull org.osgi.framework.BundleContext bundleContext,
                                                                 @NotNull
                                                                 @NotNull org.osgi.framework.ServiceReference<javax.servlet.Servlet> reference)
      • service

        public void service​(@NotNull
                            @NotNull javax.servlet.ServletRequest servletRequest,
                            @NotNull
                            @NotNull javax.servlet.ServletResponse response)
                     throws javax.servlet.ServletException,
                            IOException
        Specified by:
        service in interface javax.servlet.Servlet
        Specified by:
        service in class javax.servlet.GenericServlet
        Throws:
        javax.servlet.ServletException
        IOException