public class ActionDispatcher extends Object
| Constructor and Description |
|---|
ActionDispatcher() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterAction(ActionRequest request,
ActionResponse response)
Called after an action processing.
|
protected void |
beforeAction(ActionRequest request,
ActionResponse response)
Called before an action.
|
void |
clearActions()
Removes all registered actions.
|
void |
dispatch(ActionRequest request,
ActionResponse response)
Dispatches a request to an action.
|
ActionDispatcher |
registerAction(HttpMethod method,
String path,
Action action)
Registers an action with given URL.
|
public ActionDispatcher registerAction(HttpMethod method, String path, Action action)
method - associated HTTP method.path - relative path associated with given action.action - action to be associated with given path and HTTP method.public void clearActions()
public void dispatch(ActionRequest request, ActionResponse response) throws javax.servlet.ServletException, IOException, NotFoundException
request - HTTP request.response - HTTP response.javax.servlet.ServletException - if the HTTP request cannot be handled.IOException - if an input or output error occurs while the servlet is handling the HTTP request.NotFoundException - if there is not action to process given request.protected void beforeAction(ActionRequest request, ActionResponse response) throws javax.servlet.ServletException, IOException
request - HTTP request.response - HTTP response.javax.servlet.ServletException - if the HTTP request cannot be handled.IOException - if an input or output error occurs while the servlet is handling the HTTP request.protected void afterAction(ActionRequest request, ActionResponse response) throws javax.servlet.ServletException, IOException
request - HTTP request.response - HTTP response.javax.servlet.ServletException - if the HTTP request cannot be handled.IOException - if an input or output error occurs while the servlet is handling the HTTP request.Copyright © 2017 Agapsys Tecnologia Ltda-ME. All rights reserved.