|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.extensions.webscripts.AbstractRuntime
public abstract class AbstractRuntime
Encapsulates the execution of a single Web Script. Sub-classes of WebScriptRuntime maintain the execution environment e.g. servlet request & response. A new instance of WebScriptRuntime is required for each invocation.
Field Summary | |
---|---|
protected RuntimeContainer |
container
Component Dependencies |
protected static org.apache.commons.logging.Log |
logger
|
Constructor Summary | |
---|---|
AbstractRuntime(RuntimeContainer container)
Construct |
Method Summary | |
---|---|
protected abstract Authenticator |
createAuthenticator()
Create a Web Script Authenticator |
protected abstract WebScriptRequest |
createRequest(Match match)
Create a Web Script Request |
protected abstract WebScriptResponse |
createResponse()
Create a Web Script Response |
void |
executeScript()
Execute the Web Script encapsulated by this Web Script Runtime |
protected void |
executeScript(WebScriptRequest scriptReq,
WebScriptResponse scriptRes,
Authenticator auth)
Execute script given the specified context |
Container |
getContainer()
Gets the Web Script Container within which this Runtime is hosted |
protected static WebScriptRequest |
getRealWebScriptRequest(WebScriptRequest request)
Helper to retrieve real (last) Web Script Request in a stack of wrapped Web Script requests |
protected static WebScriptResponse |
getRealWebScriptResponse(WebScriptResponse response)
Helper to retrieve real (last) Web Script Response in a stack of wrapped Web Script responses |
protected abstract String |
getScriptMethod()
Get the Web Script Method e.g. |
Map<String,Object> |
getScriptParameters()
Gets script parameters |
protected abstract String |
getScriptUrl()
Get the Web Script Url |
protected StatusTemplate |
getStatusCodeTemplate(int statusCode)
Get code specific Status Template path |
protected StatusTemplate |
getStatusTemplate()
Get Status Template path |
Map<String,Object> |
getTemplateParameters()
Gets template parameters |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.springframework.extensions.webscripts.Runtime |
---|
getName |
Field Detail |
---|
protected static final org.apache.commons.logging.Log logger
protected RuntimeContainer container
Constructor Detail |
---|
public AbstractRuntime(RuntimeContainer container)
container
- web script contextMethod Detail |
---|
public Container getContainer()
Runtime
getContainer
in interface Runtime
public final void executeScript()
protected void executeScript(WebScriptRequest scriptReq, WebScriptResponse scriptRes, Authenticator auth) throws IOException
scriptReq
- scriptRes
- auth
-
IOException
protected StatusTemplate getStatusCodeTemplate(int statusCode)
statusCode
-
protected StatusTemplate getStatusTemplate()
public Map<String,Object> getScriptParameters()
Runtime
getScriptParameters
in interface Runtime
public Map<String,Object> getTemplateParameters()
Runtime
getTemplateParameters
in interface Runtime
protected abstract String getScriptMethod()
protected abstract String getScriptUrl()
protected abstract WebScriptRequest createRequest(Match match)
match
- web script matching the script method and url
protected abstract WebScriptResponse createResponse()
protected abstract Authenticator createAuthenticator()
protected static WebScriptRequest getRealWebScriptRequest(WebScriptRequest request)
request
-
protected static WebScriptResponse getRealWebScriptResponse(WebScriptResponse response)
response
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |