org.apache.struts.chain.legacy
Class ComposableRequestProcessor

java.lang.Object
  extended byorg.apache.struts.action.RequestProcessor
      extended byorg.apache.struts.chain.legacy.ComposableRequestProcessor

public class ComposableRequestProcessor
extends org.apache.struts.action.RequestProcessor

ComposableRequestProcessor uses the Chain Of Resposibility design pattern (as implemented by the commons-chain package in Jakarta Commons) to support external configuration of command chains to be used. It is configured via the following context initialization parameters:

Since:
Struts 1.1
Version:
$Rev: 55324 $ $Date: 2004-10-22 19:55:27 +0100 (Fri, 22 Oct 2004) $

Field Summary
protected  org.apache.commons.chain.Catalog catalog
          The Catalog containing all of the available command chains for this module.
private static java.lang.String CATALOG_NAME
          Name of the context initialization parameter containing the name of the Catalog we will use.
protected  org.apache.commons.chain.Command command
          The Command to be executed for each request.
private static java.lang.String COMMAND_NAME
          Name of the Command to be executed for each request.
protected static org.apache.commons.logging.Log log
          The Log instance for this class.
 
Fields inherited from class org.apache.struts.action.RequestProcessor
actions, INCLUDE_PATH_INFO, INCLUDE_SERVLET_PATH, moduleConfig, servlet
 
Constructor Summary
ComposableRequestProcessor()
           
 
Method Summary
 void destroy()
          Clean up in preparation for a shutdown of this application.
 void init(org.apache.struts.action.ActionServlet servlet, org.apache.struts.config.ModuleConfig moduleConfig)
          Initialize this request processor instance.
 void process(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Process an HttpServletRequest and create the corresponding HttpServletResponse.
protected  javax.servlet.http.HttpServletRequest processMultipart(javax.servlet.http.HttpServletRequest request)
          If this is a multipart request, wrap it with a special wrapper.
 
Methods inherited from class org.apache.struts.action.RequestProcessor
doForward, doInclude, getInternal, getServletContext, internalModuleRelativeForward, internalModuleRelativeInclude, log, log, processActionCreate, processActionForm, processActionPerform, processCachedMessages, processContent, processException, processForward, processForwardConfig, processInclude, processLocale, processMapping, processNoCache, processPath, processPopulate, processPreprocess, processRoles, processValidate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CATALOG_NAME

private static final java.lang.String CATALOG_NAME

Name of the context initialization parameter containing the name of the Catalog we will use.

See Also:
Constant Field Values

COMMAND_NAME

private static final java.lang.String COMMAND_NAME

Name of the Command to be executed for each request.

See Also:
Constant Field Values

catalog

protected org.apache.commons.chain.Catalog catalog

The Catalog containing all of the available command chains for this module.


command

protected org.apache.commons.chain.Command command

The Command to be executed for each request.


log

protected static final org.apache.commons.logging.Log log

The Log instance for this class.

Constructor Detail

ComposableRequestProcessor

public ComposableRequestProcessor()
Method Detail

destroy

public void destroy()
Clean up in preparation for a shutdown of this application.


init

public void init(org.apache.struts.action.ActionServlet servlet,
                 org.apache.struts.config.ModuleConfig moduleConfig)
          throws javax.servlet.ServletException

Initialize this request processor instance.

Parameters:
servlet - The ActionServlet we are associated with
moduleConfig - The ModuleConfig we are associated with.
Throws:
javax.servlet.ServletException - If an error occurs during initialization

process

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

Process an HttpServletRequest and create the corresponding HttpServletResponse.

Parameters:
request - The servlet request we are processing
response - The servlet response we are creating
Throws:
java.io.IOException - if an input/output error occurs
javax.servlet.ServletException - if a processing exception occurs

processMultipart

protected javax.servlet.http.HttpServletRequest processMultipart(javax.servlet.http.HttpServletRequest request)
If this is a multipart request, wrap it with a special wrapper. Otherwise, return the request unchanged.

Parameters:
request - The HttpServletRequest we are processing


Copyright ? 2003 - Apache Software Foundation