|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mentawai.core.BaseAction
org.mentawai.core.SingleInstanceBaseAction
public abstract class SingleInstanceBaseAction
This is the base class for single instance actions, in other words, those actions that will be instantiated only once and shared among all requests. Sometimes, when you looking for every performance drop, you may not want to create a new action instance for every request. This class keeps the action data in thread locals, so that each thread has its own input, output, session, application and locale. The actions extending this class must be configurated with a SingleInstanceActionConfig. It is your responsibility to make your action thread-safe, otherwise you should stick with the BaseAction class.
| Field Summary |
|---|
| Fields inherited from class org.mentawai.core.BaseAction |
|---|
cookies, msgContext |
| Fields inherited from interface org.mentawai.core.Action |
|---|
ACCESSDENIED, ADD, AJAX, ALREADY, BACK, BLOCKED, CREATED, EDIT, ERROR, EXCEPTION, HTML, INDEX, JSON, JSP, LIST, LOGIN, MAIN, NEXT, NOT_FOUND, NULL, REMOVED, SHOW, STREAM, SUCCESS, TEST, UPDATED, XML |
| Constructor Summary | |
|---|---|
SingleInstanceBaseAction()
Creates a SingleInstanceBaseAction. |
|
| Method Summary | |
|---|---|
Context |
getApplication()
Gets this action application context. |
Input |
getInput()
Gets the action input. |
Locale |
getLocale()
Gets the use locale for this action. |
Output |
getOutput()
Gets the action output. |
Context |
getSession()
Gets this action session context. |
void |
setApplication(Context application)
Sets the application context for this action. |
void |
setInput(Input input)
Sets the input for this action. |
void |
setLocale(Locale loc)
Sets the user locale for this action. |
void |
setOutput(Output output)
Sets the output for this action. |
void |
setSession(Context session)
Sets the session context for this action. |
| Methods inherited from class org.mentawai.core.BaseAction |
|---|
addError, addError, addError, addError, addError, addError, addError, addError, addError, addError, addError, addError, addMessage, addMessage, addMessage, addMessage, addMessage, addMessage, addMessage, addMessage, addMessage, addMessage, addMessage, addMessage, adhere, ajax, application, commit, commit, cookies, disjoin, execute, findValue, findValue, getContextPath, getCookies, getError, getMessageTokens, getMessageTokens, getSessionLocale, getSessionObj, getUserLocale, getUserSession, hasError, init, init, input, isEmpty, isGet, isGet, isLogged, isPost, isPost, loc, onRemoved, output, redir, replaceSessionObj, replaceUserSession, rollback, rollback, session, setCookies, setMessageContext, setSessionGroup, setSessionGroup, setSessionGroups, setSessionGroups, setSessionLocale, setSessionLocale, setSessionObj, setSessionUser, setUserSession, stream, stream |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SingleInstanceBaseAction()
| Method Detail |
|---|
public void setInput(Input input)
Action
setInput in interface ActionsetInput in class BaseActioninput - the input to be setpublic void setOutput(Output output)
Action
setOutput in interface ActionsetOutput in class BaseActionoutput - the output to be setpublic void setSession(Context session)
Action
setSession in interface ActionsetSession in class BaseActionsession - The context to be setpublic void setApplication(Context application)
Action
setApplication in interface ActionsetApplication in class BaseActionapplication - The context to be setpublic void setLocale(Locale loc)
Action
setLocale in interface ActionsetLocale in class BaseActionloc - The user locale to set.public Input getInput()
Action
getInput in interface ActiongetInput in class BaseActionpublic Output getOutput()
Action
getOutput in interface ActiongetOutput in class BaseActionpublic Context getSession()
Action
getSession in interface ActiongetSession in class BaseActionpublic Context getApplication()
Action
getApplication in interface ActiongetApplication in class BaseActionpublic Locale getLocale()
Action
getLocale in interface ActiongetLocale in class BaseAction
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||