Class WebScriptServletRuntime
java.lang.Object
org.springframework.extensions.webscripts.AbstractRuntime
org.springframework.extensions.webscripts.servlet.WebScriptServletRuntime
- All Implemented Interfaces:
Runtime
- Direct Known Subclasses:
WebScriptViewRuntime
HTTP Servlet Web Script Runtime
- Author:
- davidc
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ServletAuthenticatorFactoryprotected jakarta.servlet.http.HttpServletRequestprotected jakarta.servlet.http.HttpServletResponseprotected ServerPropertiesprotected WebScriptServletRequestprotected WebScriptServletResponseprotected WebScriptServletSessionFields inherited from class org.springframework.extensions.webscripts.AbstractRuntime
container, exceptionLogger, logger, session -
Constructor Summary
ConstructorsConstructorDescriptionWebScriptServletRuntime(RuntimeContainer container, ServletAuthenticatorFactory authFactory, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, ServerProperties serverProperties) Construct -
Method Summary
Modifier and TypeMethodDescriptionprotected AuthenticatorCreate a Web Script Authenticatorprotected WebScriptRequestcreateRequest(Match match) Create a Web Script Requestprotected WebScriptResponseCreate a Web Script Responseprotected WebScriptSessionFactoryCreate a Web Script Sessionstatic jakarta.servlet.http.HttpServletRequestgetHttpServletRequest(WebScriptRequest request) Helper to get HttpServletRequest from Web Script Requeststatic jakarta.servlet.http.HttpServletResponsegetHttpServletResponse(WebScriptResponse response) Helper to get HttpServletResponse from Web Script ResponsegetName()Gets the name of the Web Script Runtimeprotected StringGet the Web Script Method e.g.protected StringGet the Web Script UrlHelper to get the List of supported methods for web script.Methods inherited from class org.springframework.extensions.webscripts.AbstractRuntime
beforeProcessError, executeScript, executeScript, getContainer, getFormatStatusTemplate, getRealWebScriptRequest, getRealWebScriptResponse, getScriptParameters, getSession, getStatusCodeTemplate, getStatusTemplate, getTemplateParameters, renderErrorResponse, setURLModelFactory
-
Field Details
-
authFactory
-
req
protected jakarta.servlet.http.HttpServletRequest req -
res
protected jakarta.servlet.http.HttpServletResponse res -
serverProperties
-
servletReq
-
servletRes
-
servletSession
-
-
Constructor Details
-
WebScriptServletRuntime
public WebScriptServletRuntime(RuntimeContainer container, ServletAuthenticatorFactory authFactory, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, ServerProperties serverProperties) Construct- Parameters:
container- RuntimeContainerauthFactory- ServletAuthenticatorFactoryreq- HttpServletRequestres- HttpServletResponseserverProperties- ServerProperties
-
-
Method Details
-
getScriptMethod
Description copied from class:AbstractRuntimeGet the Web Script Method e.g. get, post- Specified by:
getScriptMethodin classAbstractRuntime- Returns:
- web script method
-
getScriptUrl
Description copied from class:AbstractRuntimeGet the Web Script Url- Specified by:
getScriptUrlin classAbstractRuntime- Returns:
- web script url
-
createRequest
Description copied from class:AbstractRuntimeCreate a Web Script Request- Specified by:
createRequestin classAbstractRuntime- Parameters:
match- web script matching the script method and url- Returns:
- web script request
-
createResponse
Description copied from class:AbstractRuntimeCreate a Web Script Response- Specified by:
createResponsein classAbstractRuntime- Returns:
- web script response
-
createAuthenticator
Description copied from class:AbstractRuntimeCreate a Web Script Authenticator- Specified by:
createAuthenticatorin classAbstractRuntime- Returns:
- web script authenticator
-
createSessionFactory
Description copied from class:AbstractRuntimeCreate a Web Script Session- Specified by:
createSessionFactoryin classAbstractRuntime
-
getName
Description copied from interface:RuntimeGets the name of the Web Script Runtime- Returns:
- name
-
getHttpServletRequest
public static jakarta.servlet.http.HttpServletRequest getHttpServletRequest(WebScriptRequest request) Helper to get HttpServletRequest from Web Script Request- Parameters:
request- WebScriptRequest- Returns:
- HttpServletRequest
-
getHttpServletResponse
public static jakarta.servlet.http.HttpServletResponse getHttpServletResponse(WebScriptResponse response) Helper to get HttpServletResponse from Web Script Response- Parameters:
response- WebScriptResponse- Returns:
- HttpServletResponse
-
getSupportedMethods
Helper to get the List of supported methods for web script. For responding to OPTIONS requests.- Returns:
- List of supported methods for web script
-