public class MockServletConfig extends java.lang.Object implements ServletConfig
ServletConfig
interface.Constructor and Description |
---|
MockServletConfig()
Create a new MockServletConfig with a default
MockServletContext . |
MockServletConfig(ServletContext servletContext)
Create a new MockServletConfig.
|
MockServletConfig(ServletContext servletContext,
java.lang.String servletName)
Create a new MockServletConfig.
|
MockServletConfig(java.lang.String servletName)
Create a new MockServletConfig with a default
MockServletContext . |
Modifier and Type | Method and Description |
---|---|
void |
addInitParameter(java.lang.String name,
java.lang.String value) |
java.lang.String |
getInitParameter(java.lang.String name) |
java.util.Enumeration<java.lang.String> |
getInitParameterNames() |
ServletContext |
getServletContext() |
java.lang.String |
getServletName() |
public MockServletConfig()
MockServletContext
.public MockServletConfig(java.lang.String servletName)
MockServletContext
.servletName
- the name of the servletpublic MockServletConfig(@Nullable ServletContext servletContext)
servletContext
- the ServletContext that the servlet runs inpublic MockServletConfig(@Nullable ServletContext servletContext, java.lang.String servletName)
servletContext
- the ServletContext that the servlet runs inservletName
- the name of the servletpublic java.lang.String getServletName()
getServletName
in interface ServletConfig
public ServletContext getServletContext()
getServletContext
in interface ServletConfig
public void addInitParameter(java.lang.String name, java.lang.String value)
public java.lang.String getInitParameter(java.lang.String name)
getInitParameter
in interface ServletConfig
public java.util.Enumeration<java.lang.String> getInitParameterNames()
getInitParameterNames
in interface ServletConfig