org.springframework.extensions.surf.support
Class ThreadLocalRequestContext

java.lang.Object
  extended by org.springframework.extensions.surf.support.BaseFactoryBean
      extended by org.springframework.extensions.surf.support.ThreadLocalRequestContext
All Implemented Interfaces:
Serializable, RequestContext
Direct Known Subclasses:
AbstractRequestContext

public abstract class ThreadLocalRequestContext
extends BaseFactoryBean
implements RequestContext

An abstract Request Context implementation that is responsible for holding the value of the Request Context for the current thread. It supplies a static instance getter that can be used directly to return the current RequestContext object.

Author:
Kevin Roast
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.springframework.extensions.surf.RequestContext
ATTR_REQUEST_CONTEXT, DEBUG_MODE_VALUE_COMPONENTS, VALUE_CREDENTIAL_VAULT, VALUE_HEAD_TAGS, VALUE_IDENTITY_VAULT
 
Constructor Summary
protected ThreadLocalRequestContext(WebFrameworkServiceRegistry serviceRegistry, javax.servlet.http.HttpServletRequest request)
          Override the default constructor to set the RequestContext value for the current thread
 
Method Summary
static RequestContext getRequestContext()
          Instance getter to return the RequestContext for the current thread
 void release()
          Release resources
 
Methods inherited from class org.springframework.extensions.surf.support.BaseFactoryBean
getResourceService, getServiceRegistry, getWebFrameworkConfiguration, getWebFrameworkManager
 
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.surf.RequestContext
getCredentialVault, getCurrentObject, getCurrentObjectId, getFormatId, getId, getLinkBuilder, getModel, getPage, getPageId, getPageTitle, getParameter, getParameters, getRenderingComponents, getRequest, getRequestContent, getRequestContentType, getRequestMethod, getRootPage, getServiceRegistry, getSiteConfiguration, getTemplate, getTemplateId, getTheme, getThemeId, getUri, getUser, getUserId, getValue, getValuesMap, getViewModel, getWebsiteTitle, hasParameter, hasValue, removeValue, setCurrentObject, setFormatId, setModel, setPage, setRenderingComponent, setTemplate, setThemeId, setUri, setUser, setValue, setViewModel
 

Constructor Detail

ThreadLocalRequestContext

protected ThreadLocalRequestContext(WebFrameworkServiceRegistry serviceRegistry,
                                    javax.servlet.http.HttpServletRequest request)
Override the default constructor to set the RequestContext value for the current thread

Method Detail

getRequestContext

public static RequestContext getRequestContext()
Instance getter to return the RequestContext for the current thread

Returns:
RequestContext

release

public void release()
Release resources

Specified by:
release in interface RequestContext


Copyright © 2009 SpringSource, Inc. All Rights Reserved.