org.spicefactory.cinnamon.web
Class HttpRequestContext

java.lang.Object
  extended by org.spicefactory.cinnamon.service.RequestContext
      extended by org.spicefactory.cinnamon.web.HttpRequestContext

public class HttpRequestContext
extends RequestContext

RequestContext implementation to be used when Cinnamon runs inside a ServletContainer.

Author:
Jens Halm

Method Summary
protected  Map<String,Object> createApplicationMap()
          Creates the application attribute Map for this request.
protected  Map<String,String> createInitMap()
          Creates the initialization parameter Map for this request.
protected  Map<String,String> createParameterMap()
          Creates the request parameter Map for this request.
protected  Map<String,String[]> createParameterValuesMap()
          Creates the request parameter Map for this request.
protected  Map<String,Object> createRequestMap()
          Creates the request attribute Map for this request.
protected  Map<String,Object> createSessionMap()
          Creates the session attribute Map for this request.
 Object getRequest()
          Returns an environment-specific instance representing the current request.
 Object getResponse()
          Returns an environment-specific instance representing the current response.
 
Methods inherited from class org.spicefactory.cinnamon.service.RequestContext
getApplicationMap, getCinnamonConfig, getCurrentContext, getInitMap, getParameterMap, getParameterValuesMap, getRequestMap, getSessionMap, setCurrentContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRequest

public Object getRequest()
Description copied from class: RequestContext
Returns an environment-specific instance representing the current request. In a web application this will be an instance of HttpServletRequest.

Specified by:
getRequest in class RequestContext
Returns:
an environment-specific instance representing the current request

getResponse

public Object getResponse()
Description copied from class: RequestContext
Returns an environment-specific instance representing the current response. In a web application this will be an instance of HttpServletResponse.

Specified by:
getResponse in class RequestContext
Returns:
an environment-specific instance representing the current response

createApplicationMap

protected Map<String,Object> createApplicationMap()
Description copied from class: RequestContext
Creates the application attribute Map for this request.

Specified by:
createApplicationMap in class RequestContext
Returns:
the application attribute Map for this request

createSessionMap

protected Map<String,Object> createSessionMap()
Description copied from class: RequestContext
Creates the session attribute Map for this request.

Specified by:
createSessionMap in class RequestContext
Returns:
the session attribute Map for this request

createRequestMap

protected Map<String,Object> createRequestMap()
Description copied from class: RequestContext
Creates the request attribute Map for this request.

Specified by:
createRequestMap in class RequestContext
Returns:
the request attribute Map for this request

createInitMap

protected Map<String,String> createInitMap()
Description copied from class: RequestContext
Creates the initialization parameter Map for this request.

Specified by:
createInitMap in class RequestContext
Returns:
the initialization parameter Map for this request

createParameterMap

protected Map<String,String> createParameterMap()
Description copied from class: RequestContext
Creates the request parameter Map for this request. For multi-value parameters only the first value will be included.

Specified by:
createParameterMap in class RequestContext
Returns:
the request parameter Map for this request

createParameterValuesMap

protected Map<String,String[]> createParameterValuesMap()
Description copied from class: RequestContext
Creates the request parameter Map for this request. The values of this Map are String arrays to allow multiple values for each parameter.

Specified by:
createParameterValuesMap in class RequestContext
Returns:
the request parameter Map for this request