org.springframework.extensions.webscripts.servlet
Class WebScriptServletRuntime

java.lang.Object
  extended by org.springframework.extensions.webscripts.AbstractRuntime
      extended by org.springframework.extensions.webscripts.servlet.WebScriptServletRuntime
All Implemented Interfaces:
Runtime

public class WebScriptServletRuntime
extends AbstractRuntime

HTTP Servlet Web Script Runtime

Author:
davidc

Field Summary
protected  ServletAuthenticatorFactory authFactory
           
protected  javax.servlet.http.HttpServletRequest req
           
protected  javax.servlet.http.HttpServletResponse res
           
protected  ServerProperties serverProperties
           
protected  WebScriptServletRequest servletReq
           
protected  WebScriptServletResponse servletRes
           
 
Fields inherited from class org.springframework.extensions.webscripts.AbstractRuntime
container, logger
 
Constructor Summary
WebScriptServletRuntime(RuntimeContainer container, ServletAuthenticatorFactory authFactory, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, ServerProperties serverProperties)
          Construct
 
Method Summary
protected  Authenticator createAuthenticator()
          Create a Web Script Authenticator
protected  WebScriptRequest createRequest(Match match)
          Create a Web Script Request
protected  WebScriptResponse createResponse()
          Create a Web Script Response
static javax.servlet.http.HttpServletRequest getHttpServletRequest(WebScriptRequest request)
          Helper to get HttpServletRequest from Web Script Request
static javax.servlet.http.HttpServletResponse getHttpServletResponse(WebScriptResponse response)
          Helper to get HttpServletResponse from Web Script Response
 String getName()
          Gets the name of the Web Script Runtime
protected  String getScriptMethod()
          Get the Web Script Method e.g.
protected  String getScriptUrl()
          Get the Web Script Url
 
Methods inherited from class org.springframework.extensions.webscripts.AbstractRuntime
executeScript, executeScript, getContainer, getRealWebScriptRequest, getRealWebScriptResponse, getScriptParameters, getStatusCodeTemplate, getStatusTemplate, getTemplateParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

authFactory

protected ServletAuthenticatorFactory authFactory

req

protected javax.servlet.http.HttpServletRequest req

res

protected javax.servlet.http.HttpServletResponse res

serverProperties

protected ServerProperties serverProperties

servletReq

protected WebScriptServletRequest servletReq

servletRes

protected WebScriptServletResponse servletRes
Constructor Detail

WebScriptServletRuntime

public WebScriptServletRuntime(RuntimeContainer container,
                               ServletAuthenticatorFactory authFactory,
                               javax.servlet.http.HttpServletRequest req,
                               javax.servlet.http.HttpServletResponse res,
                               ServerProperties serverProperties)
Construct

Parameters:
registry -
serviceRegistry -
authenticator -
req -
res -
Method Detail

getScriptMethod

protected String getScriptMethod()
Description copied from class: AbstractRuntime
Get the Web Script Method e.g. get, post

Specified by:
getScriptMethod in class AbstractRuntime
Returns:
web script method

getScriptUrl

protected String getScriptUrl()
Description copied from class: AbstractRuntime
Get the Web Script Url

Specified by:
getScriptUrl in class AbstractRuntime
Returns:
web script url

createRequest

protected WebScriptRequest createRequest(Match match)
Description copied from class: AbstractRuntime
Create a Web Script Request

Specified by:
createRequest in class AbstractRuntime
Parameters:
match - web script matching the script method and url
Returns:
web script request

createResponse

protected WebScriptResponse createResponse()
Description copied from class: AbstractRuntime
Create a Web Script Response

Specified by:
createResponse in class AbstractRuntime
Returns:
web script response

createAuthenticator

protected Authenticator createAuthenticator()
Description copied from class: AbstractRuntime
Create a Web Script Authenticator

Specified by:
createAuthenticator in class AbstractRuntime
Returns:
web script authenticator

getName

public String getName()
Description copied from interface: Runtime
Gets the name of the Web Script Runtime

Returns:
name

getHttpServletRequest

public static javax.servlet.http.HttpServletRequest getHttpServletRequest(WebScriptRequest request)
Helper to get HttpServletRequest from Web Script Request

Parameters:
request -
Returns:

getHttpServletResponse

public static javax.servlet.http.HttpServletResponse getHttpServletResponse(WebScriptResponse response)
Helper to get HttpServletResponse from Web Script Response

Parameters:
response -
Returns:


Copyright © 2009 SpringSource, Inc. All Rights Reserved.