Package io.undertow.servlet.spec
Class ServletConfigImpl
- java.lang.Object
-
- io.undertow.servlet.spec.ServletConfigImpl
-
- All Implemented Interfaces:
ServletConfig
public class ServletConfigImpl extends Object implements ServletConfig
- Author:
- Stuart Douglas
-
-
Constructor Summary
Constructors Constructor Description ServletConfigImpl(ServletInfo servletInfo, ServletContext servletContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetInitParameter(String name)Gets the value of the initialization parameter with the given name.Enumeration<String>getInitParameterNames()Returns the names of the servlet's initialization parameters as anEnumerationofStringobjects, or an emptyEnumerationif the servlet has no initialization parameters.ServletContextgetServletContext()Returns a reference to theServletContextin which the caller is executing.StringgetServletName()Returns the name of this servlet instance.
-
-
-
Constructor Detail
-
ServletConfigImpl
public ServletConfigImpl(ServletInfo servletInfo, ServletContext servletContext)
-
-
Method Detail
-
getServletName
public String getServletName()
Description copied from interface:ServletConfigReturns 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:
getServletNamein interfaceServletConfig- Returns:
- the name of the servlet instance
-
getServletContext
public ServletContext getServletContext()
Description copied from interface:ServletConfigReturns a reference to theServletContextin which the caller is executing.- Specified by:
getServletContextin interfaceServletConfig- Returns:
- a
ServletContextobject, used by the caller to interact with its servlet container - See Also:
ServletContext
-
getInitParameter
public String getInitParameter(String name)
Description copied from interface:ServletConfigGets the value of the initialization parameter with the given name.- Specified by:
getInitParameterin interfaceServletConfig- Parameters:
name- the name of the initialization parameter whose value to get- Returns:
- a
Stringcontaining the value of the initialization parameter, ornullif the initialization parameter does not exist
-
getInitParameterNames
public Enumeration<String> getInitParameterNames()
Description copied from interface:ServletConfigReturns the names of the servlet's initialization parameters as anEnumerationofStringobjects, or an emptyEnumerationif the servlet has no initialization parameters.- Specified by:
getInitParameterNamesin interfaceServletConfig- Returns:
- an
EnumerationofStringobjects containing the names of the servlet's initialization parameters
-
-