org.apache.myfaces.test.mock
Class MockServletConfig

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

public class MockServletConfig
extends Object
implements javax.servlet.ServletConfig

Mock implementation of ServletConfig.

$Id$

Since:
1.0.0

Constructor Summary
MockServletConfig()
          Construct a default instance.
MockServletConfig(javax.servlet.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()
          
 javax.servlet.ServletContext getServletContext()
          
 String getServletName()
          
 void setServletContext(javax.servlet.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(javax.servlet.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(javax.servlet.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 javax.servlet.ServletConfig

getInitParameterNames

public Enumeration getInitParameterNames()

Specified by:
getInitParameterNames in interface javax.servlet.ServletConfig

getServletContext

public javax.servlet.ServletContext getServletContext()

Specified by:
getServletContext in interface javax.servlet.ServletConfig

getServletName

public String getServletName()

Specified by:
getServletName in interface javax.servlet.ServletConfig


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.