Class SingleInstanceActionConfig

  extended by org.mentawai.core.ActionConfig
      extended by 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.

Sergio Oliveira

Field Summary
Fields inherited from class org.mentawai.core.ActionConfig
Constructor Summary
SingleInstanceActionConfig(Action instance)
SingleInstanceActionConfig(java.lang.String name, Action instance)
SingleInstanceActionConfig(java.lang.String name, Action instance, java.lang.String innerAction)
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, filter, filter, filter, filter, filter, filterFirst, filterFirst, filterFirst, filterFirst, fwdError, fwdOk, getActionClass, getAutoConsequence, getConsequence, getConsequence, getDirFromClass, getFilters, getFilters, getFirstFilters, getInnerAction, getName, on, on, on, redirError, redirError, redirError, redirOk, redirOk, redirOk, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public SingleInstanceActionConfig(Action instance)


public SingleInstanceActionConfig(java.lang.String name,
                                  Action instance)


public SingleInstanceActionConfig(java.lang.String name,
                                  Action instance,
                                  java.lang.String innerAction)
Method Detail


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.

getAction in class ActionConfig
The action instance to use for the request.

Copyright © 2005 Mentawai Team. All Rights Reserved.