org.mentawai.core
Class SingleInstanceActionConfig
java.lang.Object
org.mentawai.core.ActionConfig
org.mentawai.core.SingleInstanceActionConfig
public class SingleInstanceActionConfig
- extends ActionConfig
Use this action config if you want your action to be a single instance for all requests,
in other words, you don't want to create a new instance of your action for every request.
If you use this action config, it is your responsibility to make your action thread-safe.
If you are not sure that your action is thread-safe, than you should not use this action config.
Sometimes our actions are so simple (Ex: org.mentawai.action.SuccessAction) that it doesn't make sense to create a new instance for every request.
Although this is not a requirement, it is strongly recommended that you use SingleInstanceActionConfigs to configure SingleInstanceBaseActions.
- Author:
- Sergio Oliveira
|
Method Summary |
Action |
getAction()
Returns an action instance to be used with this request. |
| Methods inherited from class org.mentawai.core.ActionConfig |
addConsequence, addConsequence, addFilter, addFilter, addFilter, addFilter, addFilter, addFilterFirst, addFilterFirst, addFilterFirst, addFilterFirst, ajaxError, ajaxOk, all, catchAll, chainError, chainOk, filter, filter, filter, filter, filter, filterFirst, filterFirst, filterFirst, filterFirst, fwdError, fwdOk, getActionClass, getAutoConsequence, getCatchAll, getConsequence, getConsequence, getDirFromClass, getFilters, getFilters, getFirstFilters, getInnerAction, getName, internalOnly, isInternalOnly, on, on, on, redirError, redirError, redirError, redirOk, redirOk, redirOk, toString |
SingleInstanceActionConfig
public SingleInstanceActionConfig(Action instance)
SingleInstanceActionConfig
public SingleInstanceActionConfig(String name,
Action instance)
SingleInstanceActionConfig
public SingleInstanceActionConfig(String name,
Action instance,
String innerAction)
getAction
public Action getAction()
- Returns an action instance to be used with this request.
This method will return the same instance for every call.
It is your responsibility to make your action thread-safe.
- Overrides:
getAction in class ActionConfig
- Returns:
- The action instance to use for the request.
Copyright © 2012. All Rights Reserved.