Class NanoServletConfig

java.lang.Object
cloud.piranha.nano.NanoServletConfig
All Implemented Interfaces:
jakarta.servlet.ServletConfig

class NanoServletConfig extends Object implements jakarta.servlet.ServletConfig
The ServletConfig class used by NanoPiranhaBuilder so it can initialize the Servlet.
Author:
Manfred Riem (mriem@manorrock.com)
  • Field Details

    • initParameters

      private final HashMap<String,String> initParameters
      Stores the init parameters.
    • servletContext

      private final jakarta.servlet.ServletContext servletContext
      Stores the servlet context.
    • servletName

      private String servletName
      Stores the servlet name.
  • Constructor Details

    • NanoServletConfig

      public NanoServletConfig(jakarta.servlet.ServletContext servletContext)
      Constructor.
      Parameters:
      servletContext - the servlet context.
  • Method Details

    • getInitParameter

      public String getInitParameter(String name)
      Get the init parameter.
      Specified by:
      getInitParameter in interface jakarta.servlet.ServletConfig
      Parameters:
      name - the name.
      Returns:
      the value, or null if not found.
    • getInitParameterNames

      public Enumeration<String> getInitParameterNames()
      Returns the init parameter names.
      Specified by:
      getInitParameterNames in interface jakarta.servlet.ServletConfig
      Returns:
      the init parameter names
    • getServletContext

      public jakarta.servlet.ServletContext getServletContext()
      Returns the servlet context.
      Specified by:
      getServletContext in interface jakarta.servlet.ServletConfig
      Returns:
      the servlet context
    • getServletName

      public String getServletName()
      Returns the servlet name.
      Specified by:
      getServletName in interface jakarta.servlet.ServletConfig
      Returns:
      the servlet name
    • setInitParameter

      public void setInitParameter(String name, String value)
      Set the init parameter.
      Parameters:
      name - the name.
      value - the value.
    • setServletName

      public void setServletName(String servletName)
      Set the servlet name.
      Parameters:
      servletName - the servlet name.