com.mockrunner.mock.web
Class MockServletConfig

java.lang.Object
  extended by com.mockrunner.mock.web.MockServletConfig
All Implemented Interfaces:
javax.servlet.ServletConfig

public class MockServletConfig
extends java.lang.Object
implements javax.servlet.ServletConfig

Mock implementation of ServletConfig.


Constructor Summary
MockServletConfig()
           
 
Method Summary
 void clearInitParameters()
          Clears the init parameters.
 java.lang.String getInitParameter(java.lang.String name)
           
 java.util.Enumeration getInitParameterNames()
           
 javax.servlet.ServletContext getServletContext()
           
 java.lang.String getServletName()
           
 void setInitParameter(java.lang.String name, java.lang.String value)
          Sets an init parameter.
 void setInitParameters(java.util.Map parameters)
          Sets several init parameters.
 void setServletContext(javax.servlet.ServletContext servletContext)
          Sets the ServletContext.
 void setServletName(java.lang.String servletName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockServletConfig

public MockServletConfig()
Method Detail

getServletName

public java.lang.String getServletName()
Specified by:
getServletName in interface javax.servlet.ServletConfig

setServletName

public void setServletName(java.lang.String servletName)

getServletContext

public javax.servlet.ServletContext getServletContext()
Specified by:
getServletContext in interface javax.servlet.ServletConfig

setServletContext

public void setServletContext(javax.servlet.ServletContext servletContext)
Sets the ServletContext.

Parameters:
servletContext - the ServletContext

clearInitParameters

public void clearInitParameters()
Clears the init parameters.


getInitParameter

public java.lang.String getInitParameter(java.lang.String name)
Specified by:
getInitParameter in interface javax.servlet.ServletConfig

setInitParameter

public void setInitParameter(java.lang.String name,
                             java.lang.String value)
Sets an init parameter.

Parameters:
name - the name
value - the value

setInitParameters

public void setInitParameters(java.util.Map parameters)
Sets several init parameters.

Parameters:
parameters - the parameter map

getInitParameterNames

public java.util.Enumeration getInitParameterNames()
Specified by:
getInitParameterNames in interface javax.servlet.ServletConfig