com.cinecolombia.cinecolombia.control.web
Class MainServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--com.cinecolombia.cinecolombia.control.web.MainServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class MainServlet
extends javax.servlet.http.HttpServlet

Main Servlet of the cinecolombia module: MVC controller in the Application layer. This is a main dispatcher for all the system.

Author:
CincoSOFT
See Also:
Serialized Form
Created:
Junio 2003

Field Summary
private  Debug debug
           
private  boolean firstRequest
           
 
Fields inherited from class javax.servlet.http.HttpServlet
 
Fields inherited from class javax.servlet.GenericServlet
 
Constructor Summary
MainServlet()
           
 
Method Summary
private  void captureEnvironmentVariables(javax.servlet.http.HttpServletRequest request)
          actions for a new session: capture Environment variables, set web session variables, clean temporal directories
private  boolean controlTimeout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          control time out in cinecolombia module In order to not loose the web session variables, the session of cinecolombia module should never timeout; real time out control in the module is done by difference between current time and BaseSessionTime.
private  void debuggingMainServlet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          debugging MainServlet
private  void dispatch(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          dispatch on any request that was selected in the banner of any module; it is a function exclusive of central cinecolombia module.
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          process get request from user
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          process post request from user
private  RequestProcessor getRequestProcessor()
          auxiliary method that instances an unique RequestProcessor by web context
private  ScreenFlowManager getScreenFlowManager()
          auxiliary method that instances an unique ScreenFlowManager by web context
 void init()
          unique instances of RequestProcessor and ScreenFlowManager by web context
 
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

firstRequest

private boolean firstRequest

debug

private Debug debug
Constructor Detail

MainServlet

public MainServlet()
Method Detail

init

public void init()
unique instances of RequestProcessor and ScreenFlowManager by web context

Overrides:
init in class javax.servlet.GenericServlet

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws java.io.IOException,
                   javax.servlet.ServletException
process post request from user

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

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws java.io.IOException,
                  javax.servlet.ServletException
process get request from user

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

getRequestProcessor

private RequestProcessor getRequestProcessor()
auxiliary method that instances an unique RequestProcessor by web context

Returns:
The requestProcessor value

getScreenFlowManager

private ScreenFlowManager getScreenFlowManager()
auxiliary method that instances an unique ScreenFlowManager by web context

Returns:
The screenFlowManager value

debuggingMainServlet

private void debuggingMainServlet(javax.servlet.http.HttpServletRequest request,
                                  javax.servlet.http.HttpServletResponse response)
debugging MainServlet

Parameters:
request - HTTP request
response - HTTP responser

controlTimeout

private boolean controlTimeout(javax.servlet.http.HttpServletRequest request,
                               javax.servlet.http.HttpServletResponse response)
                        throws java.io.IOException,
                               javax.servlet.ServletException
control time out in cinecolombia module In order to not loose the web session variables, the session of cinecolombia module should never timeout; real time out control in the module is done by difference between current time and BaseSessionTime.

Parameters:
request - HTTP request
response - HTTP response
Returns:
true if timeout; false otherwise
Throws:
java.io.IOException
javax.servlet.ServletException

captureEnvironmentVariables

private void captureEnvironmentVariables(javax.servlet.http.HttpServletRequest request)
actions for a new session: capture Environment variables, set web session variables, clean temporal directories

Parameters:
request - HTTP request

dispatch

private void dispatch(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
               throws java.io.IOException,
                      javax.servlet.ServletException
dispatch on any request that was selected in the banner of any module; it is a function exclusive of central cinecolombia module.

Parameters:
request - HTTP request
response - HTTP response
Throws:
java.io.IOException
javax.servlet.ServletException