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.
|
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, getConsequence, getConsequence, getFilters, getFilters, getInnerAction, getName, setInnerAction, toString |
instance
private Action instance
SingleInstanceActionConfig
public SingleInstanceActionConfig(Action instance)
SingleInstanceActionConfig
public SingleInstanceActionConfig(java.lang.String name,
Action instance)
SingleInstanceActionConfig
public SingleInstanceActionConfig(java.lang.String name,
Action instance,
java.lang.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