com.mockrunner.mock.web
Class MockRequestDispatcher
java.lang.Object
com.mockrunner.mock.web.MockRequestDispatcher
- All Implemented Interfaces:
- javax.servlet.RequestDispatcher
public class MockRequestDispatcher
- extends java.lang.Object
- implements javax.servlet.RequestDispatcher
Mock implementation of RequestDispatcher
.
Method Summary |
void |
forward(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
|
javax.servlet.ServletRequest |
getForwardedRequest()
|
javax.servlet.ServletResponse |
getForwardedResponse()
|
javax.servlet.ServletRequest |
getIncludedRequest()
|
javax.servlet.ServletResponse |
getIncludedResponse()
|
java.lang.String |
getPath()
Returns the name or path used to retrieve this RequestDispatcher . |
void |
include(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
|
void |
setPath(java.lang.String path)
Sets the path for this RequestDispatcher . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MockRequestDispatcher
public MockRequestDispatcher()
setPath
public void setPath(java.lang.String path)
- Sets the path for this
RequestDispatcher
.
- Parameters:
path
- the path
getPath
public java.lang.String getPath()
- Returns the name or path used to retrieve this
RequestDispatcher
.
- Returns:
- the name or path used to retrieve this
RequestDispatcher
forward
public void forward(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- Specified by:
forward
in interface javax.servlet.RequestDispatcher
- Throws:
javax.servlet.ServletException
java.io.IOException
include
public void include(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- Specified by:
include
in interface javax.servlet.RequestDispatcher
- Throws:
javax.servlet.ServletException
java.io.IOException
getForwardedRequest
public javax.servlet.ServletRequest getForwardedRequest()
getForwardedResponse
public javax.servlet.ServletResponse getForwardedResponse()
getIncludedRequest
public javax.servlet.ServletRequest getIncludedRequest()
getIncludedResponse
public javax.servlet.ServletResponse getIncludedResponse()