org.codehaus.waffle.servlet
Class WaffleServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.codehaus.waffle.servlet.WaffleServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
WaffleXMLServlet

public class WaffleServlet
extends javax.servlet.http.HttpServlet

Waffle's FrontController for handling user requests.

Author:
Michael Ward
See Also:
Serialized Form

Constructor Summary
WaffleServlet()
           
WaffleServlet(ControllerDefinitionFactory controllerDefinitionFactory, DataBinder dataBinder, ActionMethodExecutor actionMethodExecutor, ActionMethodResponseHandler actionMethodResponseHandler, Validator validator, RequestAttributeBinder requestAttributeBinder)
           
 
Method Summary
protected  void buildViewToReferrer(ControllerDefinition controllerDefinition, ActionMethodResponse actionMethodResponse)
          Build a view back to the referring page (use the Controller's name as the View name).
protected  ControllerDefinition getControllerDefinition(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Obtain the controller the user is requesting.
 void init()
           
protected  void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Responsible for servicing the requests from the users.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WaffleServlet

public WaffleServlet()

WaffleServlet

public WaffleServlet(ControllerDefinitionFactory controllerDefinitionFactory,
                     DataBinder dataBinder,
                     ActionMethodExecutor actionMethodExecutor,
                     ActionMethodResponseHandler actionMethodResponseHandler,
                     Validator validator,
                     RequestAttributeBinder requestAttributeBinder)
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

getControllerDefinition

protected ControllerDefinition getControllerDefinition(javax.servlet.http.HttpServletRequest request,
                                                       javax.servlet.http.HttpServletResponse response)
                                                throws javax.servlet.ServletException
Obtain the controller the user is requesting.

Throws:
javax.servlet.ServletException

service

protected void service(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
                throws javax.servlet.ServletException,
                       java.io.IOException
Responsible for servicing the requests from the users.

Overrides:
service in class javax.servlet.http.HttpServlet
Parameters:
request -
response -
Throws:
javax.servlet.ServletException
java.io.IOException

buildViewToReferrer

protected void buildViewToReferrer(ControllerDefinition controllerDefinition,
                                   ActionMethodResponse actionMethodResponse)
Build a view back to the referring page (use the Controller's name as the View name).



Copyright © 2007 null. All Rights Reserved.