Class NanoServletConfig

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

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

    Fields
    Modifier and Type Field Description
    private java.util.HashMap<java.lang.String,​java.lang.String> initParameters
    Stores the init parameters.
    private ServletContext servletContext
    Stores the servlet context.
    private java.lang.String servletName
    Stores the servlet name.
  • Constructor Summary

    Constructors
    Constructor Description
    NanoServletConfig​(ServletContext servletContext)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getInitParameter​(java.lang.String name)
    Get the init parameter.
    java.util.Enumeration<java.lang.String> getInitParameterNames()
    Get the init parameter names.
    ServletContext getServletContext()
    Get the servlet context.
    java.lang.String getServletName()
    Get the servlet name.
    void setInitParameter​(java.lang.String name, java.lang.String value)
    Set the init parameter.
    void setServletName​(java.lang.String servletName)
    Set the servlet name.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • initParameters

      private final java.util.HashMap<java.lang.String,​java.lang.String> initParameters
      Stores the init parameters.
    • servletContext

      private final ServletContext servletContext
      Stores the servlet context.
    • servletName

      private java.lang.String servletName
      Stores the servlet name.
  • Constructor Details

    • NanoServletConfig

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

    • getInitParameter

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

      public java.util.Enumeration<java.lang.String> getInitParameterNames()
      Get the init parameter names.
      Specified by:
      getInitParameterNames in interface ServletConfig
      Returns:
      the init parameter names.
    • getServletContext

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

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

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

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