public class MadvocController
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MadvocController.ActionRequestInvoker
Async request invoker.
|
| Modifier and Type | Field and Description |
|---|---|
protected ActionPathRewriter |
actionPathRewriter |
protected ActionsManager |
actionsManager |
protected javax.servlet.ServletContext |
applicationContext |
protected java.util.concurrent.Executor |
executor |
protected MadvocConfig |
madvocConfig |
protected ResultsManager |
resultsManager |
| Constructor and Description |
|---|
MadvocController() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
createAction(java.lang.Class actionClass)
Creates new action object from
ActionConfig using default constructor. |
protected ActionRequest |
createActionRequest(java.lang.String actionPath,
ActionConfig actionConfig,
java.lang.Object action,
javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse)
Creates new action request.
|
protected java.util.concurrent.Executor |
createAsyncExecutor()
Creates async executor.
|
javax.servlet.ServletContext |
getApplicationContext()
Returns application context set during the initialization.
|
void |
init(javax.servlet.ServletContext servletContext)
Initializes controller by providing application context.
|
java.lang.String |
invoke(java.lang.String actionPath,
javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse)
Invokes action registered to provided action path, Provides action chaining, by invoking the next action request.
|
void |
render(ActionRequest actionRequest,
java.lang.Object resultObject)
Invokes a result after the action invocation.
|
@PetiteInject protected MadvocConfig madvocConfig
@PetiteInject protected ActionsManager actionsManager
@PetiteInject protected ActionPathRewriter actionPathRewriter
@PetiteInject protected ResultsManager resultsManager
protected javax.servlet.ServletContext applicationContext
protected java.util.concurrent.Executor executor
public void init(javax.servlet.ServletContext servletContext)
null
if application is not started in web environment (eg tests).protected java.util.concurrent.Executor createAsyncExecutor()
public javax.servlet.ServletContext getApplicationContext()
public java.lang.String invoke(java.lang.String actionPath,
javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse)
throws java.lang.Exception
null if action path is consumed and has been invoked by this controller; otherwise
the action path string is returned (it might be different than original one, provided in arguments).
On first invoke, initializes the action configuration before further proceeding.java.lang.Exceptionpublic void render(ActionRequest actionRequest, java.lang.Object resultObject) throws java.lang.Exception
Results may be objects that specify which action result will be used to render the result.
Result value may consist of two parts: type and value. Result type is optional and, if exists, it is separated
by semi-colon from the value. If type is not specified
then the default result type if still not defined. Result type defines which
ActionResult should be used for rendering the value.
Result value is first checked against aliased values. Then, it is resolved and then passed
to the founded ActionResult.
java.lang.ExceptionActionResult.render(jodd.madvoc.ActionRequest, Object)protected java.lang.Object createAction(java.lang.Class actionClass)
ActionConfig using default constructor.protected ActionRequest createActionRequest(java.lang.String actionPath, ActionConfig actionConfig, java.lang.Object action, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse)
actionPath - action pathactionConfig - action configurationaction - action objectservletRequest - http requestservletResponse - http responseCopyright © 2003-2013 Jodd Team