com.taggercat.controller
Class AbstractRequestController
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<java.lang.String,NamedActionActionMapping>
com.taggercat.controller.AbstractRequestController
- All Implemented Interfaces:
- RequestController, java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,NamedActionActionMapping>
- Direct Known Subclasses:
- DefaultRequestController
public abstract class AbstractRequestController
- extends java.util.HashMap<java.lang.String,NamedActionActionMapping>
- implements RequestController
This class is an abstract implementation of the RequestController interface.
There is typically one main Request Controller that delegates requests to appropriate request handlers.
- See Also:
- Serialized Form
-
| Nested classes/interfaces inherited from class java.util.AbstractMap |
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
|
Method Summary |
abstract void |
addAdditionalHandlers(RequestHandlerChain requestHandlerChain,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This is an extension point for adding additional handlers to the request change. |
javax.servlet.http.HttpServlet |
getServlet()
Returns the Servlet that created this RequestController. |
void |
init(javax.servlet.http.HttpServlet servlet)
Called by the HttpServlet to initialize this request map. |
abstract void |
service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Called by the servlet for both get and post requests. |
| Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
equals, hashCode |
getServlet
public javax.servlet.http.HttpServlet getServlet()
- Description copied from interface:
RequestController
- Returns the
Servlet that created this RequestController.
- Specified by:
getServlet in interface RequestController
- Returns:
Servlet instance
init
public void init(javax.servlet.http.HttpServlet servlet)
throws javax.servlet.ServletException
- Called by the HttpServlet to initialize this request map.
- Specified by:
init in interface RequestController
- Throws:
javax.servlet.ServletException - generally a wrapper for an underlying exception- Parameters:
servlet - the calling HttpServlet
addAdditionalHandlers
public abstract void addAdditionalHandlers(RequestHandlerChain requestHandlerChain,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException
- This is an extension point for adding additional handlers to the request change.
The default implementation does nothing.
- Throws:
javax.servlet.ServletException- Parameters:
requestHandlerChain - the request chainrequest - the HttpServletRequestresponse - the HttpServletResponse
service
public abstract void service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException
- Called by the servlet for both get and post requests.
- Specified by:
service in interface RequestController
- Throws:
javax.servlet.ServletException- Parameters:
request - the HttpServletRequestresponse - the HttpServletResponse