Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.mentawai.core
Class Controller  view Controller download Controller.java

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.mentawai.core.Controller
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class Controller
extends javax.servlet.http.HttpServlet

The Mentawai central controller. Mentawai actions are intercepted and executed by this controller.


Field Summary
private static javax.servlet.ServletContext application
           
private static ApplicationManager appManager
           
private static javax.servlet.ServletConfig config
           
 
Fields inherited from class javax.servlet.http.HttpServlet
 
Constructor Summary
Controller()
           
 
Method Summary
private static InvocationChain createInvocationChain(ActionConfig ac, Action action, java.lang.String innerAction)
           
 void destroy()
          Called by the servlet container to indicate to a servlet that the servlet is being taken out of service.
private  java.lang.String getActionName(javax.servlet.http.HttpServletRequest req)
           
static javax.servlet.ServletContext getApplication()
          Returns the ServletContext of your web application.
static ApplicationManager getApplicationManager()
          Returnts the ApplicationManager of your web application.
private  java.lang.String getInnerActionName(java.lang.String action)
           
 void init(javax.servlet.ServletConfig conf)
          Called by the servlet container to indicate to a servlet that the servlet is being placed into service.
private  void initApplicationManager()
           
static Consequence invokeAction(ActionConfig ac, Action action, java.lang.String innerAction)
          Invoke an action and return the consequence generated by this invocation.
protected  void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Receives standard HTTP requests from the public service method and dispatches them to the doXXX methods defined in this class.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
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

appManager

private static ApplicationManager appManager

application

private static javax.servlet.ServletContext application

config

private static javax.servlet.ServletConfig config
Constructor Detail

Controller

public Controller()
Method Detail

init

public void init(javax.servlet.ServletConfig conf)
          throws javax.servlet.ServletException
Description copied from class: javax.servlet.GenericServlet
Called by the servlet container to indicate to a servlet that the servlet is being placed into service. See Servlet.init(javax.servlet.ServletConfig)>Servlet.init(javax.servlet.ServletConfig) 55 .

This implementation stores the javax.servlet.ServletConfig object it receives from the servlet container for later use. When overriding this form of the method, call super.init(config).


initApplicationManager

private void initApplicationManager()
                             throws javax.servlet.ServletException

destroy

public void destroy()
Description copied from class: javax.servlet.GenericServlet
Called by the servlet container to indicate to a servlet that the servlet is being taken out of service. See Servlet.destroy()>Servlet.destroy() 55 .


getApplication

public static javax.servlet.ServletContext getApplication()
Returns the ServletContext of your web application.


getApplicationManager

public static ApplicationManager getApplicationManager()
Returnts the ApplicationManager of your web application.


getActionName

private java.lang.String getActionName(javax.servlet.http.HttpServletRequest req)

getInnerActionName

private java.lang.String getInnerActionName(java.lang.String action)

service

protected void service(javax.servlet.http.HttpServletRequest req,
                       javax.servlet.http.HttpServletResponse res)
                throws javax.servlet.ServletException,
                       java.io.IOException
Description copied from class: javax.servlet.http.HttpServlet
Receives standard HTTP requests from the public service method and dispatches them to the doXXX methods defined in this class. This method is an HTTP-specific version of the Servlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)>Servlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) 55 method. There's no need to override this method.


invokeAction

public static Consequence invokeAction(ActionConfig ac,
                                       Action action,
                                       java.lang.String innerAction)
                                throws java.lang.Exception
Invoke an action and return the consequence generated by this invocation.


createInvocationChain

private static InvocationChain createInvocationChain(ActionConfig ac,
                                                     Action action,
                                                     java.lang.String innerAction)