亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? requestcontextholder.java

?? spring framework 2.5.4源代碼
?? JAVA
字號:
/*
 * Copyright 2002-2008 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.web.context.request;

import javax.faces.context.FacesContext;

import org.springframework.core.NamedInheritableThreadLocal;
import org.springframework.core.NamedThreadLocal;
import org.springframework.util.ClassUtils;

/**
 * Holder class to expose the web request in the form of a thread-bound
 * {@link RequestAttributes} object.
 *
 * <p>Use {@link RequestContextListener} or
 * {@link org.springframework.web.filter.RequestContextFilter} to expose
 * the current web request. Note that
 * {@link org.springframework.web.servlet.DispatcherServlet} and
 * {@link org.springframework.web.portlet.DispatcherPortlet} already
 * expose the current request by default.
 *
 * @author Juergen Hoeller
 * @author Rod Johnson
 * @since 2.0
 * @see RequestContextListener
 * @see org.springframework.web.filter.RequestContextFilter
 * @see org.springframework.web.servlet.DispatcherServlet
 * @see org.springframework.web.portlet.DispatcherPortlet
 */
public abstract class RequestContextHolder  {
	
	private static final boolean jsfPresent = ClassUtils.isPresent("javax.faces.context.FacesContext");

	private static final ThreadLocal requestAttributesHolder = new NamedThreadLocal("Request attributes");

	private static final ThreadLocal inheritableRequestAttributesHolder =
			new NamedInheritableThreadLocal("Request context");


	/**
	 * Reset the RequestAttributes for the current thread.
	 */
	public static void resetRequestAttributes() {
		requestAttributesHolder.set(null);
		inheritableRequestAttributesHolder.set(null);
	}

	/**
	 * Bind the given RequestAttributes to the current thread,
	 * <i>not</i> exposing it as inheritable for child threads.
	 * @param attributes the RequestAttributes to expose
	 * @see #setRequestAttributes(RequestAttributes, boolean)
	 */
	public static void setRequestAttributes(RequestAttributes attributes) {
		setRequestAttributes(attributes, false);
	}

	/**
	 * Bind the given RequestAttributes to the current thread.
	 * @param attributes the RequestAttributes to expose
	 * @param inheritable whether to expose the RequestAttributes as inheritable
	 * for child threads (using an {@link java.lang.InheritableThreadLocal})
	 */
	public static void setRequestAttributes(RequestAttributes attributes, boolean inheritable) {
		if (inheritable) {
			inheritableRequestAttributesHolder.set(attributes);
			requestAttributesHolder.set(null);
		}
		else {
			requestAttributesHolder.set(attributes);
			inheritableRequestAttributesHolder.set(null);
		}
	}

	/**
	 * Return the RequestAttributes currently bound to the thread.
	 * @return the RequestAttributes currently bound to the thread,
	 * or <code>null</code> if none bound
	 */
	public static RequestAttributes getRequestAttributes() {
		RequestAttributes attributes = (RequestAttributes) requestAttributesHolder.get();
		if (attributes == null) {
			attributes = (RequestAttributes) inheritableRequestAttributesHolder.get();
		}
		return attributes;
	}

	/**
	 * Return the RequestAttributes currently bound to the thread.
	 * <p>Exposes the previously bound RequestAttributes instance, if any.
	 * Falls back to the current JSF FacesContext, if any.
	 * @return the RequestAttributes currently bound to the thread
	 * @throws IllegalStateException if no RequestAttributes object
	 * is bound to the current thread
	 * @see #setRequestAttributes
	 * @see ServletRequestAttributes
	 * @see FacesRequestAttributes
	 * @see javax.faces.context.FacesContext#getCurrentInstance()
	 */
	public static RequestAttributes currentRequestAttributes() throws IllegalStateException {
		RequestAttributes attributes = getRequestAttributes();
		if (attributes == null) {
			if (jsfPresent) {
				attributes = FacesRequestAttributesFactory.getFacesRequestAttributes();
			}
			if (attributes == null) {
				throw new IllegalStateException("No thread-bound request found: " +
						"Are you referring to request attributes outside of an actual web request, " +
						"or processing a request outside of the originally receiving thread? " +
						"If you are actually operating within a web request and still receive this message, " +
						"your code is probably running outside of DispatcherServlet/DispatcherPortlet: " +
						"In this case, use RequestContextListener or RequestContextFilter to expose the current request.");
			}
		}
		return attributes;
	}


	/**
	 * Inner class to avoid hard-coded JSF dependency.
 	 */
	private static class FacesRequestAttributesFactory {

		public static RequestAttributes getFacesRequestAttributes() {
			FacesContext facesContext = FacesContext.getCurrentInstance();
			return (facesContext != null ? new FacesRequestAttributes(facesContext) : null);
		}
	}

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品网站在线观看| 这里是久久伊人| 五月天网站亚洲| 亚洲视频一二三| 国产亚洲成aⅴ人片在线观看| 99久久99久久精品免费观看| 免费观看成人鲁鲁鲁鲁鲁视频| 国产精品乱人伦| 日韩精品中文字幕在线不卡尤物| 色婷婷综合久久久久中文一区二区| 国精产品一区一区三区mba视频 | 日本欧美韩国一区三区| 欧美一区二视频| 欧美一区二区视频网站| 一本大道久久a久久综合婷婷| 国产麻豆精品视频| 免费在线观看精品| 国产精品一区二区在线观看不卡| 久久精品国产999大香线蕉| 青青草成人在线观看| 国内国产精品久久| 国产精品影视天天线| 国产精品亚洲а∨天堂免在线| 亚洲成人av在线电影| 日韩成人伦理电影在线观看| 麻豆91在线播放免费| 久久er精品视频| 国产一区二区三区久久悠悠色av| 狠狠色狠狠色综合系列| 国产综合成人久久大片91| 国产在线国偷精品产拍免费yy| 国产91色综合久久免费分享| 成人理论电影网| 国产精品456| 欧洲精品视频在线观看| 91精品国产综合久久久久久| 欧美一区二区三区免费大片| 欧美性受xxxx黑人xyx性爽| 欧美日韩国产精选| 日韩欧美另类在线| 国产精品免费丝袜| 天堂午夜影视日韩欧美一区二区| 久久精品999| gogo大胆日本视频一区| 7777精品伊人久久久大香线蕉经典版下载 | 午夜日韩在线电影| 美腿丝袜亚洲三区| 久久99久久精品欧美| 成人精品视频一区二区三区尤物| 一本一本久久a久久精品综合麻豆| 欧美视频在线不卡| 久久久精品免费免费| 亚洲激情图片qvod| 国内外成人在线视频| 色综合天天狠狠| 欧美性猛片aaaaaaa做受| 日韩一区二区电影在线| 中文字幕在线不卡视频| 蜜臀av一区二区在线免费观看| 美女一区二区三区| 一本大道久久a久久综合| 日韩欧美电影一区| 亚洲高清三级视频| 成人高清免费观看| 日韩精品一区二区在线| 中文在线资源观看网站视频免费不卡| 亚洲精品免费在线播放| 国产一区二区伦理| 欧美猛男男办公室激情| 一区二区欧美精品| 色天天综合久久久久综合片| 亚洲视频一区二区在线| 成人精品国产免费网站| 国产精品卡一卡二| av午夜一区麻豆| 亚洲啪啪综合av一区二区三区| 成人av动漫网站| 亚洲日本在线看| 在线精品视频免费观看| 午夜影视日本亚洲欧洲精品| 91.麻豆视频| 久久国产精品99精品国产 | 韩国v欧美v日本v亚洲v| 欧美成人aa大片| 国产毛片精品视频| 国产日韩精品一区二区三区| 成人精品视频一区二区三区| 亚洲欧洲国产日韩| 欧美在线看片a免费观看| 亚洲高清视频中文字幕| 日韩欧美在线一区二区三区| 国产一区二区三区四区五区美女| 国产午夜精品福利| 一本到不卡免费一区二区| 午夜激情久久久| 欧美xxxxx裸体时装秀| 国产成人精品免费网站| 亚洲欧美aⅴ...| 91精品国产色综合久久不卡蜜臀| 寂寞少妇一区二区三区| 中文字幕在线播放不卡一区| 欧美少妇性性性| 精品在线一区二区三区| 自拍偷在线精品自拍偷无码专区| 欧亚洲嫩模精品一区三区| 日韩国产一区二| 欧美国产亚洲另类动漫| 欧美日韩不卡一区二区| 国产麻豆日韩欧美久久| 亚洲一区二区欧美日韩 | 亚洲日本乱码在线观看| 欧美日韩卡一卡二| 国产另类ts人妖一区二区| 亚洲激情自拍视频| 欧美成人a在线| 欧美日韩综合在线免费观看| 国产精品一二三四区| 一区av在线播放| 国产欧美日产一区| 7777女厕盗摄久久久| 91在线观看视频| 国产激情一区二区三区四区 | 99久久国产免费看| 久久国产精品一区二区| 亚洲国产精品自拍| 亚洲欧洲韩国日本视频| 久久精品人人做人人综合| 91麻豆精品国产自产在线观看一区 | 福利一区福利二区| 偷拍日韩校园综合在线| 亚洲品质自拍视频| 国产欧美一区二区精品婷婷| 欧美不卡一区二区三区四区| 欧美男同性恋视频网站| 成年人国产精品| 国内成人精品2018免费看| 日本不卡一二三区黄网| 亚洲专区一二三| 亚洲精品福利视频网站| 国产日韩欧美不卡| 久久精品一二三| 欧美sm极限捆绑bd| 91精品国产免费| 欧美伦理视频网站| 欧美午夜精品久久久| 日本韩国一区二区三区视频| 东方欧美亚洲色图在线| 久久se精品一区二区| 麻豆国产欧美一区二区三区| 日本不卡视频在线| 日韩av一二三| 久久av资源站| 国产成人免费在线| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 国产福利一区二区三区视频在线| 奇米影视一区二区三区小说| 日韩电影免费在线| 久久99最新地址| 国产成人亚洲综合a∨猫咪| 国产不卡视频一区| 91浏览器在线视频| 欧美视频一二三区| 在线成人免费视频| 精品日本一线二线三线不卡| 久久久91精品国产一区二区三区| 久久久国产午夜精品| 中文字幕一区二区三区四区| 亚洲精品日产精品乱码不卡| 亚洲国产精品一区二区尤物区| 天天色综合天天| 国产真实乱偷精品视频免| 国产精品一卡二| 91福利在线看| 日韩一级完整毛片| 国产精品素人一区二区| 一区二区三区中文字幕精品精品 | 欧美成人一区二区| 久久亚洲精品国产精品紫薇| 国产欧美视频在线观看| 一区二区三区加勒比av| 美女一区二区视频| 色综合咪咪久久| 日韩一区二区麻豆国产| 国产精品传媒入口麻豆| 午夜电影一区二区三区| 国产91丝袜在线18| 欧美美女黄视频| 欧美激情中文不卡| 婷婷亚洲久悠悠色悠在线播放| 国产精品资源站在线| 欧美性xxxxx极品少妇| 国产午夜亚洲精品理论片色戒| 亚洲自拍与偷拍| 国产成人高清视频| 在线电影欧美成精品| 自拍偷拍国产亚洲| 国产一区二区福利视频| 欧美精品视频www在线观看 | 日本韩国精品在线| 精品99999|