org.apache.struts.action
Class ActionMappings
java.lang.Object
org.apache.struts.action.ActionMappings
- Serializable
public class ActionMappings
extends java.lang.Object
implements Serializable
Encapsulate a collection of ActionMapping objects that can be
administered and searched, while hiding the internal implementation.
ModuleConfig
Version:
- Craig R. McClanahan
protected FastHashMap | mappings - The collection of ActionMapping instances, keyed by request path.
|
protected ActionServlet | servlet - The ActionServlet instance of our owning application.
|
protected ActionMapping | unknown - The ActionMapping that should handle unknown request paths, if any.
|
mappings
protected FastHashMap mappings
The collection of ActionMapping instances, keyed by request path.
servlet
protected ActionServlet servlet
The ActionServlet instance of our owning application.
unknown
protected ActionMapping unknown
The ActionMapping that should handle unknown request paths, if any.
addMapping
public void addMapping(ActionMapping mapping)
Register a logical mapping to the set configured for this servlet.
mapping
- The mapping to be added
findMapping
public ActionMapping findMapping(String path)
Return the mapping associated with the specified logical name,
if any; otherwise return null
.
path
- The request path for which to retrieve a mapping
findMappings
public String[] findMappings()
Return the set of paths for mappings defined in this collection.
If there are no such mappings, a zero-length array is returned.
getFast
public boolean getFast()
Return the "fast" mode flag.
getServlet
public ActionServlet getServlet()
Return the ActionServlet
instance of our owning
application.
getUnknown
public ActionMapping getUnknown(HttpServletRequest request)
Return the Action that should handle unknown request paths, if any.
request
- The servlet request we are processing
getUnknown
public ActionMapping getUnknown(ServletRequest request)
Return the Action that should handle unknown request paths, if any.
The default implementation casts the request to HttpServletRequest
and calls the corresponding version of this method.
request
- The servlet request we are processing
removeMapping
public void removeMapping(ActionMapping mapping)
Deregister a mapping from the set configured for this servlet.
mapping
- The mapping to be deregistered
setFast
public void setFast(boolean fast)
Set the "fast" mode flag.
fast
- The new fast mode flag
setServlet
public void setServlet(ActionServlet servlet)
Set the ActionServlet
instance of our owning application.
servlet
- The new servlet instance
Copyright B) 2000-2005 - Apache Software Foundation