org.nanocontainer.nanowar.struts
Class PicoRequestProcessor

java.lang.Object
  extended by org.apache.struts.action.RequestProcessor
      extended by org.nanocontainer.nanowar.struts.PicoRequestProcessor

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

Uses Pico to produce Actions and inject dependencies into them. If you are using the Tiles library, use PicoTilesRequestProcessor instead.

Author:
Stephen Molitor
See Also:
ActionFactory, PicoTilesRequestProcessor

Field Summary
 
Fields inherited from class org.apache.struts.action.RequestProcessor
actions, INCLUDE_PATH_INFO, INCLUDE_SERVLET_PATH, log, moduleConfig, servlet
 
Constructor Summary
PicoRequestProcessor()
           
 
Method Summary
protected  org.apache.struts.action.Action processActionCreate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.struts.action.ActionMapping mapping)
          Creates or retrieves the action instance.
 
Methods inherited from class org.apache.struts.action.RequestProcessor
destroy, doForward, doInclude, getInternal, getServletContext, init, internalModuleRelativeForward, internalModuleRelativeInclude, process, processActionForm, processActionPerform, processCachedMessages, processContent, processException, processForward, processForwardConfig, processInclude, processLocale, processMapping, processMultipart, processNoCache, processPath, processPopulate, processPreprocess, processRoles, processValidate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PicoRequestProcessor

public PicoRequestProcessor()
Method Detail

processActionCreate

protected org.apache.struts.action.Action processActionCreate(javax.servlet.http.HttpServletRequest request,
                                                              javax.servlet.http.HttpServletResponse response,
                                                              org.apache.struts.action.ActionMapping mapping)
                                                       throws IOException
Creates or retrieves the action instance. The action is retrieved from the actions Pico container, using the mapping path as the component key. If no such action exists, a new one will be instantiated and placed in the actions container, thus injecting its dependencies.

Overrides:
processActionCreate in class org.apache.struts.action.RequestProcessor
Parameters:
request - the HTTP request object.
response - the HTTP response object.
mapping - the action mapping.
Returns:
the action instance.
Throws:
IOException


Copyright © 2003-2009 Codehaus. All Rights Reserved.