org.apache.shale.test.mock
Class MockServlet

java.lang.Object
  extended by org.apache.shale.test.mock.MockServlet
All Implemented Interfaces:
Servlet

public class MockServlet
extends Object
implements Servlet

Mock implementation of Servlet.

$Id$


Constructor Summary
MockServlet()
          Create a default Servlet instance.
MockServlet(ServletConfig config)
          Create a new Servlet with the specified ServletConfig.
 
Method Summary
 void destroy()
          
 ServletConfig getServletConfig()
          
 String getServletInfo()
          
 void init(ServletConfig config)
          
 void service(ServletRequest request, ServletResponse response)
          
 void setServletConfig(ServletConfig config)
          Set the ServletConfig instance for this servlet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockServlet

public MockServlet()

Create a default Servlet instance.


MockServlet

public MockServlet(ServletConfig config)
            throws ServletException

Create a new Servlet with the specified ServletConfig.

Parameters:
config - The new ServletConfig instance
Throws:
ServletException
Method Detail

setServletConfig

public void setServletConfig(ServletConfig config)

Set the ServletConfig instance for this servlet.

Parameters:
config - The new ServletConfig instance

destroy

public void destroy()

Specified by:
destroy in interface Servlet

getServletConfig

public ServletConfig getServletConfig()

Specified by:
getServletConfig in interface Servlet

getServletInfo

public String getServletInfo()

Specified by:
getServletInfo in interface Servlet

init

public void init(ServletConfig config)
          throws ServletException

Specified by:
init in interface Servlet
Throws:
ServletException

service

public void service(ServletRequest request,
                    ServletResponse response)
             throws IOException,
                    ServletException

Specified by:
service in interface Servlet
Throws:
IOException
ServletException


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