Class DeferredServletConfig

  • All Implemented Interfaces:
    javax.servlet.ServletConfig

    public class DeferredServletConfig
    extends Object
    implements javax.servlet.ServletConfig
    A servlet config for a servlet which is deployed after the main servlet already has been deployed - and of which the context may have already been initialised. This configuration provides the (deferred) servlet context, the name of the servlet as well as the init parameters. The init parameters will reflect the values of the init parameters of the corresponding (deferred) servlet context at the time the servlet has been added to the servlet context as well as the init parameters added via Registration.
    • Field Detail

      • servletName

        protected final String servletName
        The name of the servlet.
      • servletContext

        protected final javax.servlet.ServletContext servletContext
        The servlet context, i. e. the multiplexing servlet context for the (deferred) servlet.
      • initParams

        protected final Map<String,​String> initParams
        The init parameters of the servlet containing the values of the multiplexing servlet context from the time the servlet has been added to the servlet context as well as the init parameters changed via Registration at the time the constructor of this servlet config has been called.
    • Constructor Detail

      • DeferredServletConfig

        protected DeferredServletConfig​(String servletName,
                                        javax.servlet.ServletContext servletContext,
                                        Map<String,​String> initParams)
        Creates a new servlet config for a servlet that is deferred. When calling the constructor, the init parameter values will be taken over (and not change any more) from the servlet context and the Registration.
        Parameters:
        servletName - The name of the servlet.
        servletContext - The servlet context, i. e. the multiplexing servlet context for the (deferred) servlet.
        initParams - The init parameters of the servlet containing the values of the multiplexing servlet context from the time the servlet has been added to the servlet context as well as the init parameters changed via Registration.
    • Method Detail

      • getServletName

        public String getServletName()
        Specified by:
        getServletName in interface javax.servlet.ServletConfig
      • getServletContext

        public javax.servlet.ServletContext getServletContext()
        Specified by:
        getServletContext in interface javax.servlet.ServletConfig
      • getInitParameter

        public String getInitParameter​(String name)
        Specified by:
        getInitParameter in interface javax.servlet.ServletConfig
      • getInitParameterNames

        public Enumeration<String> getInitParameterNames()
        Specified by:
        getInitParameterNames in interface javax.servlet.ServletConfig