Class DeferredServletConfig

java.lang.Object
de.aristaflow.adept2.base.servletcontainer.demux.DeferredServletConfig
All Implemented Interfaces:
jakarta.servlet.ServletConfig

public class DeferredServletConfig extends Object implements jakarta.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 Details

    • servletName

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

      protected final jakarta.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 Details

    • DeferredServletConfig

      protected DeferredServletConfig(String servletName, jakarta.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 Details

    • getServletName

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

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

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

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