Class MockServletConfig
java.lang.Object
org.apache.commons.chain.web.javax.servlet.MockServletConfig
- All Implemented Interfaces:
javax.servlet.ServletConfig
Mock
ServletConfig
implementation.-
Constructor Summary
ConstructorDescriptionDefault Constructor.MockServletConfig
(String servletName) Construct an instance with the specified name.MockServletConfig
(String servletName, javax.servlet.ServletContext servletContext) Construct an instance with the specified name and context. -
Method Summary
Modifier and TypeMethodDescriptiongetInitParameter
(String name) Get a specified init parameter.Get the init parameter names.javax.servlet.ServletContext
Get the servlet context.Return the servlet name.void
setInitParameter
(String name, String value) Set a specified init parameter.
-
Constructor Details
-
MockServletConfig
public MockServletConfig()Default Constructor. -
MockServletConfig
Construct an instance with the specified name.- Parameters:
servletName
- the servlet name
-
MockServletConfig
Construct an instance with the specified name and context.- Parameters:
servletName
- the servlet nameservletContext
- the servlet context
-
-
Method Details
-
getInitParameter
Get a specified init parameter.- Specified by:
getInitParameter
in interfacejavax.servlet.ServletConfig
- Parameters:
name
- parameter name- Returns:
- the parameter value
-
getInitParameterNames
Get the init parameter names.- Specified by:
getInitParameterNames
in interfacejavax.servlet.ServletConfig
- Returns:
- the set of parameter names
-
getServletContext
Get the servlet context.- Specified by:
getServletContext
in interfacejavax.servlet.ServletConfig
- Returns:
- the servlet context
-
getServletName
Return the servlet name.- Specified by:
getServletName
in interfacejavax.servlet.ServletConfig
- Returns:
- The servlet name
-
setInitParameter
Set a specified init parameter.- Parameters:
name
- parameter namevalue
- the parameter value
-