org.slim3.struts.test
Class MockRequestDispatcher

java.lang.Object
  extended by org.slim3.struts.test.MockRequestDispatcher
All Implemented Interfaces:
RequestDispatcher

public class MockRequestDispatcher
extends Object
implements RequestDispatcher

A mock implementation for RequestDispatcher.

Since:
3.0
Author:
higa

Field Summary
protected  String path
          The path.
protected  ServletRequest request
          The request.
protected  ServletResponse response
          The response
 
Constructor Summary
MockRequestDispatcher(String path)
          Constructor.
 
Method Summary
 void forward(ServletRequest request, ServletResponse response)
           
 ServletRequest getRequest()
          Returns the request.
 ServletResponse getResponse()
          Returns the response.
 void include(ServletRequest request, ServletResponse response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

path

protected String path
The path.


request

protected ServletRequest request
The request.


response

protected ServletResponse response
The response

Constructor Detail

MockRequestDispatcher

public MockRequestDispatcher(String path)
Constructor.

Parameters:
path - the path
Method Detail

forward

public void forward(ServletRequest request,
                    ServletResponse response)
             throws ServletException,
                    IOException
Specified by:
forward in interface RequestDispatcher
Throws:
ServletException
IOException

include

public void include(ServletRequest request,
                    ServletResponse response)
             throws ServletException,
                    IOException
Specified by:
include in interface RequestDispatcher
Throws:
ServletException
IOException

getRequest

public ServletRequest getRequest()
Returns the request.

Returns:
the request

getResponse

public ServletResponse getResponse()
Returns the response.

Returns:
the response


Copyright © 2008-2009 The Slim3 project. All Rights Reserved.