org.apache.shale.test.mock
Class MockServletConfig

java.lang.Object
  extended by org.apache.shale.test.mock.MockServletConfig
All Implemented Interfaces:
ServletConfig

public class MockServletConfig
extends Object
implements ServletConfig

Mock implementation of ServletConfig.

$Id$


Constructor Summary
MockServletConfig()
          Construct a default instance.
MockServletConfig(ServletContext context)
          Construct an instance associated with the specified servlet context.
 
Method Summary
 void addInitParameter(String name, String value)
          Add a servlet initialization parameter.
 String getInitParameter(String name)
          
 Enumeration getInitParameterNames()
          
 ServletContext getServletContext()
          
 String getServletName()
          
 void setServletContext(ServletContext context)
          Set the servlet context for this application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockServletConfig

public MockServletConfig()

Construct a default instance.


MockServletConfig

public MockServletConfig(ServletContext context)

Construct an instance associated with the specified servlet context.

Parameters:
context - The associated ServletContext
Method Detail

addInitParameter

public void addInitParameter(String name,
                             String value)

Add a servlet initialization parameter.

Parameters:
name - Parameter name
value - Parameter value

setServletContext

public void setServletContext(ServletContext context)

Set the servlet context for this application.

Parameters:
context - The new servlet context

getInitParameter

public String getInitParameter(String name)

Specified by:
getInitParameter in interface ServletConfig

getInitParameterNames

public Enumeration getInitParameterNames()

Specified by:
getInitParameterNames in interface ServletConfig

getServletContext

public ServletContext getServletContext()

Specified by:
getServletContext in interface ServletConfig

getServletName

public String getServletName()

Specified by:
getServletName in interface ServletConfig


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.