|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.servlet.GenericServlet | +--javax.servlet.http.HttpServlet | +--com.fruitioninc.jwc.ControllerServlet
This is the singleton servlet that acts as the controller for all the components in the application. It is responsible for the following:
Field Summary | |
static java.lang.String |
PARAMETER_EVENT_NAME
|
static java.lang.String |
PARAMETER_EVENT_SOURCE_PATH_NAME
|
Constructor Summary | |
ControllerServlet()
|
Method Summary | |
protected void |
applyApplicationState(Application application,
javax.servlet.http.HttpServletRequest request)
Applys request parameters to the state of the application. |
protected void |
dispatchRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles HTTP GET and POST requests. |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This is called by the servlet container when it receives a HTTP GET request. |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This is called by the servlet container when it receives a HTTP POST request. |
protected boolean |
handleMouseClick(Application application,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handle mouse click event if there was one. |
void |
init()
This is called by the servlet container when the servlet is loaded. |
protected void |
logRequest(javax.servlet.http.HttpServletRequest request)
This is called for each incoming request. |
protected void |
redirect(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Application application)
Redirects to another page within the application. |
protected void |
sendResponse(Application application,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Send HTTP response. |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, 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 |
Field Detail |
public static final java.lang.String PARAMETER_EVENT_SOURCE_PATH_NAME
public static final java.lang.String PARAMETER_EVENT_NAME
Constructor Detail |
public ControllerServlet()
Method Detail |
public void init() throws javax.servlet.ServletException
This is called by the servlet container when the servlet is loaded. Its job is to perform application initialization. In the future more things will happen here, but currently the only thing that happens is that calls are made to the Configuration class to get instances various factories.
If you override this method in order to perform your own application initialization, make sure to call super.init().
Currently, you must override this method in order to configure JWebComponents to use a specialized ApplicationFactory that creates instances of your Application class. In the future this configuration will done via a XML configuration file.
FIXME: implement the XML configuration file.
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doPost
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
protected void dispatchRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
protected void logRequest(javax.servlet.http.HttpServletRequest request)
protected void applyApplicationState(Application application, javax.servlet.http.HttpServletRequest request) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
protected void sendResponse(Application application, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
protected boolean handleMouseClick(Application application, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
protected void redirect(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Application application) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |