org.codehaus.waffle.action
Class DefaultActionMethodResponseHandler
java.lang.Object
org.codehaus.waffle.action.DefaultActionMethodResponseHandler
- All Implemented Interfaces:
- ActionMethodResponseHandler
public class DefaultActionMethodResponseHandler
- extends java.lang.Object
- implements ActionMethodResponseHandler
Handler that will make decisions based on what is returned from the action method:
- A View response will be directed (either redirected or forwarded)
- A ActionMethodException will set the response status and sends the message directly (perfect for ajax).
- Otherwise the response value will be sent directly to the browser as a String via Object.toString() method.
- Author:
- Michael Ward, Mauro Talevi
Method Summary |
void |
handle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ActionMethodResponse actionMethodResponse)
Handles response from an action method invocation. |
protected void |
handleResponse(javax.servlet.http.HttpServletResponse response,
java.lang.String message)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultActionMethodResponseHandler
public DefaultActionMethodResponseHandler(ViewDispatcher viewDispatcher,
ActionMonitor actionMonitor)
handle
public void handle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ActionMethodResponse actionMethodResponse)
throws java.io.IOException,
javax.servlet.ServletException
- Description copied from interface:
ActionMethodResponseHandler
- Handles response from an action method invocation. Regardless of the implementation an ActionMethodResponse
value of
null
indicates that the user should be return to the referring page.
- Specified by:
handle
in interface ActionMethodResponseHandler
- Throws:
java.io.IOException
javax.servlet.ServletException
handleResponse
protected void handleResponse(javax.servlet.http.HttpServletResponse response,
java.lang.String message)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2008. All Rights Reserved.