站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.0.5 API 文档英文版

RequestScope (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版

The Spring Framework

org.springframework.web.context.request
Class RequestScope

java.lang.Object
  extended by org.springframework.web.context.request.AbstractRequestAttributesScope
      extended by org.springframework.web.context.request.RequestScope
All Implemented Interfaces:
Scope

public class RequestScope
extends AbstractRequestAttributesScope

Request-backed Scope implementation.

Relies on a thread-bound RequestAttributes instance, which can be exported through RequestContextListener, RequestContextFilter or DispatcherServlet.

This Scope will also work for Portlet environments, through an alternate RequestAttributes implementation (as exposed out-of-the-box by Spring's DispatcherPortlet.

Since:
2.0
Author:
Rod Johnson, Juergen Hoeller, Rob Harrop
See Also:
RequestContextHolder.currentRequestAttributes(), RequestAttributes.SCOPE_REQUEST, RequestContextListener, RequestContextFilter, DispatcherServlet, DispatcherPortlet

Constructor Summary
RequestScope()
           
 
Method Summary
 String getConversationId()
          There is no conversation id concept for a request, so this method returns null.
protected  int getScope()
          Template method that determines the actual target scope.
 
Methods inherited from class org.springframework.web.context.request.AbstractRequestAttributesScope
get, registerDestructionCallback, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestScope

public RequestScope()
Method Detail

getScope

protected int getScope()
Description copied from class: AbstractRequestAttributesScope
Template method that determines the actual target scope.

Specified by:
getScope in class AbstractRequestAttributesScope
Returns:
the target scope, in the form of an appropriate RequestAttributes constant
See Also:
RequestAttributes.SCOPE_REQUEST, RequestAttributes.SCOPE_SESSION, RequestAttributes.SCOPE_GLOBAL_SESSION

getConversationId

public String getConversationId()
There is no conversation id concept for a request, so this method returns null.

Returns:
the conversation id, or null if there is no conversation id for the current scope

The Spring Framework

Copyright © 2002-2007 The Spring Framework.