Class ServletConfigImpl

java.lang.Object
org.glassfish.grizzly.servlet.ServletConfigImpl
All Implemented Interfaces:
ServletConfig

public class ServletConfigImpl extends Object implements ServletConfig
Basic ServletConfig implementation.
Author:
Jeanfrancois Arcand
  • Field Details

  • Constructor Details

    • ServletConfigImpl

      protected ServletConfigImpl(WebappContext servletContextImpl)
  • Method Details

    • getServletName

      public String getServletName()
      Returns the name of this servlet instance. The name may be provided via server administration, assigned in the web application deployment descriptor, or for an unregistered (and thus unnamed) servlet instance it will be the servlet's class name.
      Specified by:
      getServletName in interface ServletConfig
      Returns:
      the name of the servlet instance
    • getServletContext

      public ServletContext getServletContext()
      Returns a reference to the ServletContext in which the caller is executing.
      Specified by:
      getServletContext in interface ServletConfig
      Returns:
      a ServletContext object, used by the caller to interact with its servlet container
      See Also:
    • getInitParameter

      public String getInitParameter(String name)
      Gets the value of the initialization parameter with the given name.
      Specified by:
      getInitParameter in interface ServletConfig
      Parameters:
      name - the name of the initialization parameter whose value to get
      Returns:
      a String containing the value of the initialization parameter, or null if the initialization parameter does not exist
    • setInitParameters

      protected void setInitParameters(Map<String,String> parameters)
    • setServletName

      public void setServletName(String name)
      Set the name of this servlet.
      Parameters:
      name - The new name of this servlet
    • getInitParameterNames

      public Enumeration<String> getInitParameterNames()
      Returns the names of the servlet's initialization parameters as an Enumeration of String objects, or an empty Enumeration if the servlet has no initialization parameters.
      Specified by:
      getInitParameterNames in interface ServletConfig
      Returns:
      an Enumeration of String objects containing the names of the servlet's initialization parameters