org.apache.commons.chain.web.servlet
Class MockServletConfig

java.lang.Object
  extended by org.apache.commons.chain.web.servlet.MockServletConfig
All Implemented Interfaces:
ServletConfig

public class MockServletConfig
extends Object
implements ServletConfig

Mock ServletConfig implementation.


Constructor Summary
MockServletConfig()
          Default Constructor.
MockServletConfig(String servletName)
          Construct an instance with the specified name.
MockServletConfig(String servletName, ServletContext servletContext)
          Construct an instance with the specified name and context.
 
Method Summary
 String getInitParameter(String name)
          Get a specified init parameter.
 Enumeration getInitParameterNames()
          Get the init parameter names.
 ServletContext getServletContext()
          Get the servlet context.
 String getServletName()
          Return the servlet name.
 void setInitParameter(String name, String value)
          Set a specified init parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockServletConfig

public MockServletConfig()
Default Constructor.


MockServletConfig

public MockServletConfig(String servletName)
Construct an instance with the specified name.

Parameters:
servletName - the servlet name

MockServletConfig

public MockServletConfig(String servletName,
                         ServletContext servletContext)
Construct an instance with the specified name and context.

Parameters:
servletName - the servlet name
servletContext - the servlet context
Method Detail

getInitParameter

public String getInitParameter(String name)
Get a specified init parameter.

Specified by:
getInitParameter in interface ServletConfig
Parameters:
name - parameter name
Returns:
the parameter value

getInitParameterNames

public Enumeration getInitParameterNames()
Get the init parameter names.

Specified by:
getInitParameterNames in interface ServletConfig
Returns:
the set of parameter names

getServletContext

public ServletContext getServletContext()
Get the servlet context.

Specified by:
getServletContext in interface ServletConfig
Returns:
the servlet context

getServletName

public String getServletName()
Return the servlet name.

Specified by:
getServletName in interface ServletConfig
Returns:
The servlet name

setInitParameter

public void setInitParameter(String name,
                             String value)
Set a specified init parameter.

Parameters:
name - parameter name
value - the parameter value


Copyright © 2003-2010 The Apache Software Foundation. All Rights Reserved.