|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.click.servlet.MockServletConfig
Mock implementation of ServletConfig
.
Constructor Summary | |
MockServletConfig()
Create a new MockServletConfig instance. |
|
MockServletConfig(ServletContext servletContext)
Create a new MockServletConfig instance with the specified servletContext. |
|
MockServletConfig(String servletName)
Create a new MockServletConfig instance with the specified servletName. |
|
MockServletConfig(String servletName,
ServletContext servletContext)
Create a new MockServletConfig instance with the specified servletName and servletContext. |
|
MockServletConfig(String servletName,
ServletContext servletContext,
Map initParameters)
Create a new MockServletConfig instance with the specified servletName, servletContext and initialization parameters. |
Method Summary | |
void |
addInitParameter(String name,
String value)
Add an init parameter. |
void |
addInitParameters(Map initParameters)
Add the map of init parameters. |
String |
getInitParameter(String name)
Returns a String containing the value of the named initialization parameter, or null if the parameter does not exist. |
Enumeration |
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. |
ServletContext |
getServletContext()
Return the servlet context. |
String |
getServletName()
Return the servlet name. |
void |
setServletContext(ServletContext servletContext)
Set the servlet context instance. |
void |
setServletName(String servletName)
Set the servlet name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MockServletConfig()
public MockServletConfig(String servletName)
servletName
- the servlet namepublic MockServletConfig(ServletContext servletContext)
servletContext
- the servletContextpublic MockServletConfig(String servletName, ServletContext servletContext)
servletName
- the servlet nameservletContext
- the servlet contextpublic MockServletConfig(String servletName, ServletContext servletContext, Map initParameters)
servletName
- the servlet nameservletContext
- the servlet contextinitParameters
- the initialization parametersMethod Detail |
public void addInitParameter(String name, String value)
name
- The parameter namevalue
- The parameter valuepublic void addInitParameters(Map initParameters)
initParameters
- A map of init parameterspublic void setServletName(String servletName)
servletName
- the new servletNamepublic void setServletContext(ServletContext servletContext)
servletContext
- a servletContext instancepublic String getServletName()
getServletName
in interface ServletConfig
public ServletContext getServletContext()
getServletContext
in interface ServletConfig
public Enumeration getInitParameterNames()
getInitParameterNames
in interface ServletConfig
public String getInitParameter(String name)
getInitParameter
in interface ServletConfig
name
- a String specifying the name of the initialization parameter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |