| java.lang.Object org.apache.struts.action.RequestProcessor org.apache.struts.chain.ComposableRequestProcessor
ComposableRequestProcessor | public class ComposableRequestProcessor extends RequestProcessor (Code) | | 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:
- [org.apache.struts.chain.CATALOG_NAME] - Name of the Catalog in which
we will look up the Command to be executed for each request. If not
specified, the default value is struts.
- org.apache.struts.chain.COMMAND_NAME - Name of the Command which we
will execute for each request, to be looked up in the specified Catalog.
If not specified, the default value is servlet-standard.
version: $Rev: 471754 $ $Date: 2005-11-12 13:01:44 -0500 (Sat, 12 Nov 2005) version: $ since: Struts 1.1 |
Field Summary | |
final public static String | ACTION_CONTEXT_CLASS Token for ActionContext clazss so that it can be stored in the
ControllerConfig. | final protected static Log | LOG | protected Catalog | catalog The
Catalog containing all of the available command chains
for this module. | protected CatalogFactory | catalogFactory | protected Command | command |
ACTION_CONTEXT_CLASS | final public static String ACTION_CONTEXT_CLASS(Code) | | Token for ActionContext clazss so that it can be stored in the
ControllerConfig.
|
LOG | final protected static Log LOG(Code) | | The Log instance for this class.
|
catalog | protected Catalog catalog(Code) | | The
Catalog containing all of the available command chains
for this module.
|
catalogFactory | protected CatalogFactory catalogFactory(Code) | | The
CatalogFactory from which catalog containing the the
base request-processing
Command will be retrieved.
|
command | protected Command command(Code) | | The
Command to be executed for each request.
|
contextInstance | protected ActionContext contextInstance(HttpServletRequest request, HttpServletResponse response) throws ServletException(Code) | | Provide the initialized ActionContext instance which
will be used by this request. Internally, this simply calls
createActionContextInstance followed by
initializeActionContext .
Parameters: request - The servlet request we are processing Parameters: response - The servlet response we are creating Initiliazed ActionContext throws: ServletException - if a processing exception occurs |
createActionContextInstance | protected ActionContext createActionContextInstance(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response) throws ServletException(Code) | | Create a new instance of ActionContext according to
configuration. If no alternative was specified at initialization, a
new instance ServletActionContext is returned. If an
alternative was specified using the ACTION_CONTEXT_CLASS
property, then that value is treated as a classname, and an instance of
that class is created. If that class implements the same constructor
that ServletActionContext does, then that constructor will
be used: ServletContext, HttpServletRequest,
HttpServletResponse ; otherwise, it is assumed that the class has
a no-arguments constructor. If these constraints do not suit you,
simply override this method in a subclass.
Parameters: servletContext - The servlet context we are processing Parameters: request - The servlet request we are processing Parameters: response - The servlet response we are creating New instance of ActionContext throws: ServletException - if a processing exception occurs |
destroy | public void destroy()(Code) | | Clean up in preparation for a shutdown of this application.
|
init | public void init(ActionServlet servlet, ModuleConfig moduleConfig) throws ServletException(Code) | | Initialize this request processor instance.
Parameters: servlet - The ActionServlet we are associated with Parameters: moduleConfig - The ModuleConfig we are associated with. throws: ServletException - If an error occurs during initialization |
initCatalogFactory | protected void initCatalogFactory(ActionServlet servlet, ModuleConfig moduleConfig)(Code) | | Establish the CatalogFactory which will be used to look up the
catalog which has the request processing command. The base
implementation simply calls CatalogFactory.getInstance(), unless the
catalogFactory property of this object has already been set, in which
case it is not changed.
Parameters: servlet - The ActionServlet we are processing Parameters: moduleConfig - The ModuleConfig we are processing |
initializeActionContext | protected void initializeActionContext(ActionContext context)(Code) | | Set common properties on the given ActionContext
instance so that commands in the chain can count on their presence.
Note that while this method does not require that its argument be an
instance of ServletActionContext , at this time many common
Struts commands will be expecting to receive an ActionContext
which is also a ServletActionContext .
Parameters: context - The ActionContext we are processing |
processMultipart | protected HttpServletRequest processMultipart(HttpServletRequest request)(Code) | | If this is a multipart request, wrap it with a special wrapper.
Otherwise, return the request unchanged.
Parameters: request - The HttpServletRequest we are processing Original or wrapped request as appropriate |
setCatalogFactory | public void setCatalogFactory(CatalogFactory catalogFactory)(Code) | | Set the CatalogFactory instance which should be used to
find the request-processing command. In the base implementation, if
this value is not already set, then it will be initialized when
ComposableRequestProcessor.initCatalogFactory is called.
Parameters: catalogFactory - Our CatalogFactory instance |
Methods inherited from org.apache.struts.action.RequestProcessor | public void destroy()(Code)(Java Doc) protected void doForward(String uri, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code)(Java Doc) protected void doInclude(String uri, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code)(Java Doc) protected MessageResources getInternal()(Code)(Java Doc) protected ServletContext getServletContext()(Code)(Java Doc) public void init(ActionServlet servlet, ModuleConfig moduleConfig) throws ServletException(Code)(Java Doc) protected void internalModuleRelativeForward(String uri, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code)(Java Doc) protected void internalModuleRelativeInclude(String uri, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code)(Java Doc) public void process(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code)(Java Doc) protected Action processActionCreate(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws IOException(Code)(Java Doc) protected ActionForm processActionForm(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping)(Code)(Java Doc) protected ActionForward processActionPerform(HttpServletRequest request, HttpServletResponse response, Action action, ActionForm form, ActionMapping mapping) throws IOException, ServletException(Code)(Java Doc) protected void processCachedMessages(HttpServletRequest request, HttpServletResponse response)(Code)(Java Doc) protected void processContent(HttpServletRequest request, HttpServletResponse response)(Code)(Java Doc) protected ActionForward processException(HttpServletRequest request, HttpServletResponse response, Exception exception, ActionForm form, ActionMapping mapping) throws IOException, ServletException(Code)(Java Doc) protected boolean processForward(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws IOException, ServletException(Code)(Java Doc) protected void processForwardConfig(HttpServletRequest request, HttpServletResponse response, ForwardConfig forward) throws IOException, ServletException(Code)(Java Doc) protected boolean processInclude(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws IOException, ServletException(Code)(Java Doc) protected void processLocale(HttpServletRequest request, HttpServletResponse response)(Code)(Java Doc) protected ActionMapping processMapping(HttpServletRequest request, HttpServletResponse response, String path) throws IOException(Code)(Java Doc) protected HttpServletRequest processMultipart(HttpServletRequest request)(Code)(Java Doc) protected void processNoCache(HttpServletRequest request, HttpServletResponse response)(Code)(Java Doc) protected String processPath(HttpServletRequest request, HttpServletResponse response) throws IOException(Code)(Java Doc) protected void processPopulate(HttpServletRequest request, HttpServletResponse response, ActionForm form, ActionMapping mapping) throws ServletException(Code)(Java Doc) protected boolean processPreprocess(HttpServletRequest request, HttpServletResponse response)(Code)(Java Doc) protected boolean processRoles(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws IOException, ServletException(Code)(Java Doc) protected boolean processValidate(HttpServletRequest request, HttpServletResponse response, ActionForm form, ActionMapping mapping) throws IOException, ServletException, InvalidCancelException(Code)(Java Doc)
|
|
|