fc.web.servlet
Class ActionMgr

java.lang.Object
  extended by fc.web.servlet.ActionMgr

public abstract class ActionMgr
extends Object

Manages various Action available to a servlet. Subclasses should add and manage appropriate actions.


Method Summary
 void addAction(Action action)
          Registers an action.
 void handleWebRequest(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Handles a request from a web client.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

addAction

public final void addAction(Action action)
Registers an action. Action names are case insensitive.


handleWebRequest

public void handleWebRequest(javax.servlet.http.HttpServletRequest req,
                             javax.servlet.http.HttpServletResponse res)
                      throws Exception
Handles a request from a web client. Expects certain parameters to be present in the specified HttpServletRequest. The main parameter needed by this method is:
  • Param name:act
    Param value: A case-insenstive class name of the Action class that will be invoked (for example: "showdir"). Case is not important but using all lower case names will save a few machine cycles. This should match the name with which a particular action object was constructed.
Various actions expect action-specific parameters via the request object parameter. This parameters can be set programatically or via the web client and optionally, actions can also return results via setting them in the request object. The documentation for each action method should give more detail.

Throws:
Exception - if the action parameter is missing or not understood

toString

public String toString()
Overrides:
toString in class Object