Interface ServletManager

    • Method Detail

      • getContext

        org.apache.catalina.Context getContext()
        Obtains the Context.
        Returns:
        Context.
      • addServlet

        ServletServicer addServlet​(java.lang.String name,
                                   java.lang.Class<? extends javax.servlet.Servlet> servletClass,
                                   java.util.function.Consumer<org.apache.catalina.Wrapper> decorator)
        Adds a Servlet.
        Parameters:
        name - Name of Servlet.
        servletClass - Servlet Class.
        decorator - Decorates the Servlet. May be null.
        Returns:
        ServletServicer.
      • addServlet

        ServletServicer addServlet​(java.lang.String name,
                                   javax.servlet.Servlet servlet,
                                   boolean isInjectDependencies,
                                   java.util.function.Consumer<org.apache.catalina.Wrapper> decorator)
        Adds a Servlet instance.
        Parameters:
        name - Name of Servlet.
        servlet - Servlet.
        isInjectDependencies - Flags to inject dependencies into the Servlet instance.
        decorator - Decorates the Servlet. May be null.
        Returns:
        ServletServicer.
      • addFilter

        FilterServicer addFilter​(java.lang.String name,
                                 java.lang.Class<? extends javax.servlet.Filter> filterClass,
                                 java.util.function.Consumer<org.apache.tomcat.util.descriptor.web.FilterDef> decorator)
        Adds a Filter.
        Parameters:
        name - Name of Filter.
        filterClass - Filter Class.
        decorator - Decorates the Filter. May be null.
        Returns:
        FilterServicer.
      • getDependency

        <T> T getDependency​(java.lang.String qualifier,
                            java.lang.Class<? extends T> type)

        Obtains a dependency.

        The dependency is via a SupplierThreadLocal that is always available in servicing a Servlet / Filter.

        Type Parameters:
        T - Type of dependency.
        Parameters:
        qualifier - Qualifier. May be null.
        type - Type.
        Returns:
        Dependency.
      • chainInServletManager

        void chainInServletManager()
        Chains in this ServletManager to service HTTP requests. This allows the backing Servlet container to route requests to the appropriate Filter / Servlet to service the HTTP request.