Interface WebApplication

    • Method Detail

      • addErrorPage

        void addErrorPage​(int code,
                          String location)
        Adds an error page to be forwarded to on the given HTTP status code
        Parameters:
        code - the HTTP code for which the error page is to be invoked
        location - the location of the error page
      • addErrorPage

        void addErrorPage​(String exception,
                          String location)
        Adds an error page to be forwarded to on the given exception
        Parameters:
        exception - the exception for which the error page is to be invoked
        location - the location of the error page
      • addFilterMapping

        Set<String> addFilterMapping​(String filterName,
                                     boolean isMatchAfter,
                                     String... urlPatterns)
        Add a mapping for the given filter.
        Parameters:
        filterName - the filter name.
        isMatchAfter - true to call the filter this mapping applies to after declared ones, false to call it before declared ones.
        urlPatterns - the URL patterns.
        Returns:
        the possible empty set of already mapped URL patterns.
        See Also:
        FilterRegistration.addMappingForUrlPatterns(EnumSet, boolean, String...)
      • addInitializer

        void addInitializer​(String className)
        Add a servlet container initializer.
        Parameters:
        className - the class name.
      • addInitializer

        void addInitializer​(ServletContainerInitializer servletContainerInitializer)
        Add a servlet container initializer.
        Parameters:
        servletContainerInitializer - the servletContainerInitializer instance
      • addResource

        void addResource​(Resource resource)
        Add the resource.
        Parameters:
        resource - the resouce.
      • addServletMapping

        Set<String> addServletMapping​(String servletName,
                                      String... urlPatterns)
        Add a mapping for the given servlet.
        Parameters:
        servletName - the servlet name.
        urlPatterns - the URL patterns.
        Returns:
        the possible empty set of already mapped URL patterns.
        See Also:
        ServletRegistration.addMapping(String...)
      • destroy

        void destroy()
        Destroy the web application.
      • getAnnotationManager

        AnnotationManager getAnnotationManager()
        Gets the annotation manager.
        Returns:
        the annotation manager.
      • getDefaultServlet

        Servlet getDefaultServlet()
        Get the default Servlet.
        Returns:
        the default Servlet.
      • getDenyUncoveredHttpMethods

        boolean getDenyUncoveredHttpMethods()
        Are we denying uncovered HTTP methods.
        Returns:
        true if we are, false otherwise.
      • getMimeTypeManager

        MimeTypeManager getMimeTypeManager()
        Get the mime type manager.
        Returns:
        the mime type manager.
      • getMultiPartManager

        MultiPartManager getMultiPartManager()
        Get the multi part manager.
        Returns:
        the multi part manager.
      • getServletContextId

        default String getServletContextId()
        Returns the unique Id of this web application corresponding to this ServletContext.
        Returns:
        the servlet context id.
      • getHttpSessionManager

        HttpSessionManager getHttpSessionManager()
        Get the HttpSessionManager.
        Returns:
        the HttpSessionManager.
      • getHttpRequestManager

        HttpRequestManager getHttpRequestManager()
        Get the HttpRequestManager.
        Returns:
        the HttpRequestManager.
      • getObjectInstanceManager

        ObjectInstanceManager getObjectInstanceManager()
        Get the object instance manager.
        Returns:
        the DependencyInjectionManager.
      • getRequest

        ServletRequest getRequest​(ServletResponse response)
        Get the associated request.
        Parameters:
        response - the response.
        Returns:
        the associated request.
      • getResponse

        ServletResponse getResponse​(ServletRequest request)
        Get the associated response.
        Parameters:
        request - the request.
        Returns:
        the associated response.
      • getSecurityManager

        SecurityManager getSecurityManager()
        Get the security manager.
        Returns:
        the security manager.
      • getWelcomeFileManager

        WelcomeFileManager getWelcomeFileManager()
        Get the welcome file manager.
        Returns:
        the welcome file manager.
      • initialize

        void initialize()
        Initialize the web application.
      • initializeFinish

        void initializeFinish()
        Finish the initialization.
      • initializeFilters

        void initializeFilters()
        Initialize the filters.
      • initializeInitializers

        void initializeInitializers()
        Initialize the servlet container initializers.
      • initializeServlets

        void initializeServlets()
        Initialize the servlets.
      • isDistributable

        boolean isDistributable()
        Is the application distributable.
        Returns:
        true if it is, false otherwise.
      • linkRequestAndResponse

        void linkRequestAndResponse​(ServletRequest request,
                                    ServletResponse response)
        Link the request and response.
        Parameters:
        request - the request.
        response - the response.
      • setClassLoader

        void setClassLoader​(ClassLoader classLoader)
        Set the class loader.
        Parameters:
        classLoader - the class loader.
      • setContextPath

        void setContextPath​(String contextPath)
        Set the context path.
        Parameters:
        contextPath - the context path.
      • setDefaultServlet

        void setDefaultServlet​(Servlet defaultServlet)
        Set the default servlet.
        Parameters:
        defaultServlet - the default servlet.
      • setDenyUncoveredHttpMethods

        void setDenyUncoveredHttpMethods​(boolean denyUncoveredHttpMethods)
        Set if we are denying uncovered HTTP methods.
        Parameters:
        denyUncoveredHttpMethods - the boolean value.
      • setDistributable

        void setDistributable​(boolean distributable)
        Set if the web application is distributable.
        Parameters:
        distributable - the distributable flag.
      • setHttpSessionManager

        void setHttpSessionManager​(HttpSessionManager httpSessionManager)
        Set the HTTP session manager.
        Parameters:
        httpSessionManager - the HTTP session manager.
      • setHttpRequestManager

        void setHttpRequestManager​(HttpRequestManager httpRequestManager)
        Set the HTTP request manager.
        Parameters:
        httpRequestManager - the HTTP request manager.
      • setJspManager

        void setJspManager​(JspManager jspManager)
        Set the JSP manager.
        Parameters:
        jspManager - the JSP manager.
      • setLoggingManager

        void setLoggingManager​(LoggingManager loggingManager)
        Set the logging manager.
        Parameters:
        loggingManager - the logging manager.
      • setMimeTypeManager

        void setMimeTypeManager​(MimeTypeManager mimeTypeManager)
        Set the mimeType manager.
        Parameters:
        mimeTypeManager - the mimeType manager.
      • setMultiPartManager

        void setMultiPartManager​(MultiPartManager multiPartManager)
        Set the multi part manager.
        Parameters:
        multiPartManager - the multi part manager.
      • setObjectInstanceManager

        void setObjectInstanceManager​(ObjectInstanceManager objectInstanceManager)
        Set the object instance manager.
        Parameters:
        objectInstanceManager - the object instance manager.
      • setResourceManager

        void setResourceManager​(ResourceManager resourceManager)
        Set the resource manager.
        Parameters:
        resourceManager - the resource manager.
      • setSecurityManager

        void setSecurityManager​(SecurityManager securityManager)
        Set the security manager.
        Parameters:
        securityManager - the security manager.
      • setAnnotationManager

        void setAnnotationManager​(AnnotationManager annotationManager)
        Sets the annotation manager.
        Parameters:
        annotationManager - the annotation manager
      • setServletContextName

        void setServletContextName​(String servletContextName)
        Set the servlet context name.
        Parameters:
        servletContextName - the servlet context name.
      • setWebApplicationRequestMapper

        void setWebApplicationRequestMapper​(WebApplicationRequestMapper webApplicationRequestMapper)
        Set the web application request mapper.
        Parameters:
        webApplicationRequestMapper - the web application request mapper.
      • setWelcomeFileManager

        void setWelcomeFileManager​(WelcomeFileManager welcomeFileManager)
        Set the welcome file manager.
        Parameters:
        welcomeFileManager - the welcome file manager.
      • start

        void start()
        Start servicing.
      • stop

        void stop()
        Stop servicing.
      • unlinkRequestAndResponse

        void unlinkRequestAndResponse​(ServletRequest request,
                                      ServletResponse response)
        Unlink the request and response.
        Parameters:
        request - the request.
        response - the response.