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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? abstractcontroller.java

?? spring framework 2.5.4源代碼
?? JAVA
字號(hào):
/*
 * Copyright 2002-2007 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.servlet.mvc;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.support.WebContentGenerator;
import org.springframework.web.util.WebUtils;

/**
 * <p>Convenient superclass for controller implementations, using the Template
 * Method design pattern.</p>
 * 
 * <p>As stated in the {@link org.springframework.web.servlet.mvc.Controller Controller}
 * interface, a lot of functionality is already provided by certain abstract
 * base controllers. The AbstractController is one of the most important
 * abstract base controller providing basic features such as the generation
 * of caching headers and the enabling or disabling of
 * supported methods (GET/POST).</p>
 *
 * <p><b><a name="workflow">Workflow
 * (<a href="Controller.html#workflow">and that defined by interface</a>):</b><br>
 * <ol>
 *  <li>{@link #handleRequest(HttpServletRequest,HttpServletResponse) handleRequest()}
 *      will be called by the DispatcherServlet</li>
 *  <li>Inspection of supported methods (ServletException if request method
 *      is not support)</li>
 *  <li>If session is required, try to get it (ServletException if not found)</li>
 *  <li>Set caching headers if needed according to cacheSeconds propery</li>
 *  <li>Call abstract method {@link #handleRequestInternal(HttpServletRequest,HttpServletResponse) handleRequestInternal()}
 *      (optionally synchronizing around the call on the HttpSession),
 *      which should be implemented by extending classes to provide actual
 *      functionality to return {@link org.springframework.web.servlet.ModelAndView ModelAndView} objects.</li>
 * </ol>
 * </p>
 *
 * <p><b><a name="config">Exposed configuration properties</a>
 * (<a href="Controller.html#config">and those defined by interface</a>):</b><br>
 * <table border="1">
 *  <tr>
 *      <td><b>name</b></th>
 *      <td><b>default</b></td>
 *      <td><b>description</b></td>
 *  </tr>
 *  <tr>
 *      <td>supportedMethods</td>
 *      <td>GET,POST</td>
 *      <td>comma-separated (CSV) list of methods supported by this controller,
 *          such as GET, POST and PUT</td>
 *  </tr>
 *  <tr>
 *      <td>requireSession</td>
 *      <td>false</td>
 *      <td>whether a session should be required for requests to be able to
 *          be handled by this controller. This ensures that derived controller
 *          can - without fear of null pointers - call request.getSession() to
 *          retrieve a session. If no session can be found while processing
 *          the request, a ServletException will be thrown</td>
 *  </tr>
 *  <tr>
 *      <td>cacheSeconds</td>
 *      <td>-1</td>
 *      <td>indicates the amount of seconds to include in the cache header
 *          for the response following on this request. 0 (zero) will include
 *          headers for no caching at all, -1 (the default) will not generate
 *          <i>any headers</i> and any positive number will generate headers
 *          that state the amount indicated as seconds to cache the content</td>
 *  </tr>
 *  <tr>
 *      <td>synchronizeOnSession</td>
 *      <td>false</td>
 *      <td>whether the call to <code>handleRequestInternal</code> should be
 *          synchronized around the HttpSession, to serialize invocations
 *          from the same client. No effect if there is no HttpSession.
 *      </td>
 *  </tr>
 * </table>
 *
 * @author Rod Johnson
 * @author Juergen Hoeller
 * @see WebContentInterceptor
 */
public abstract class AbstractController extends WebContentGenerator implements Controller {

	private boolean synchronizeOnSession = false;


	/**
	 * Set if controller execution should be synchronized on the session,
	 * to serialize parallel invocations from the same client.
	 * <p>More specifically, the execution of the <code>handleRequestInternal</code>
	 * method will get synchronized if this flag is "true". The best available
	 * session mutex will be used for the synchronization; ideally, this will
	 * be a mutex exposed by HttpSessionMutexListener.
	 * <p>The session mutex is guaranteed to be the same object during
	 * the entire lifetime of the session, available under the key defined
	 * by the <code>SESSION_MUTEX_ATTRIBUTE</code> constant. It serves as a
	 * safe reference to synchronize on for locking on the current session.
	 * <p>In many cases, the HttpSession reference itself is a safe mutex
	 * as well, since it will always be the same object reference for the
	 * same active logical session. However, this is not guaranteed across
	 * different servlet containers; the only 100% safe way is a session mutex.
	 * @see org.springframework.web.servlet.mvc.AbstractController#handleRequestInternal
	 * @see org.springframework.web.util.HttpSessionMutexListener
	 * @see org.springframework.web.util.WebUtils#getSessionMutex(javax.servlet.http.HttpSession)
	 */
	public final void setSynchronizeOnSession(boolean synchronizeOnSession) {
		this.synchronizeOnSession = synchronizeOnSession;
	}

	/**
	 * Return whether controller execution should be synchronized on the session.
	 */
	public final boolean isSynchronizeOnSession() {
		return this.synchronizeOnSession;
	}


	public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
			throws Exception {

		// Delegate to WebContentGenerator for checking and preparing.
		checkAndPrepare(request, response, this instanceof LastModified);

		// Execute handleRequestInternal in synchronized block if required.
		if (this.synchronizeOnSession) {
			HttpSession session = request.getSession(false);
			if (session != null) {
				Object mutex = WebUtils.getSessionMutex(session);
				synchronized (mutex) {
					return handleRequestInternal(request, response);
				}
			}
		}
		
		return handleRequestInternal(request, response);
	}

	/**
	 * Template method. Subclasses must implement this.
	 * The contract is the same as for <code>handleRequest</code>.
	 * @see #handleRequest
	 */
	protected abstract ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response)
	    throws Exception;

}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩你懂的在线观看| 国产日产欧美一区二区三区| 国产成人精品免费视频网站| 亚洲狠狠丁香婷婷综合久久久| 精品捆绑美女sm三区| 欧美日韩一本到| av中文字幕不卡| 国产在线不卡一区| 日日夜夜免费精品| 一区二区三区不卡在线观看 | 精品免费国产一区二区三区四区| 国产精品99久| 久草在线在线精品观看| 一区二区三区视频在线看| 国产亚洲综合性久久久影院| 日韩一区二区三区三四区视频在线观看| 91视频一区二区| 国产不卡视频在线观看| 日本视频一区二区三区| 亚洲国产精品综合小说图片区| 中文字幕一区二区三区不卡| 久久久久久久久伊人| 日韩无一区二区| 3d动漫精品啪啪| 欧美日韩精品综合在线| 欧美三区免费完整视频在线观看| 97精品国产露脸对白| 99久久久精品免费观看国产蜜| 精彩视频一区二区三区| 秋霞成人午夜伦在线观看| 天天亚洲美女在线视频| 亚洲国产一区视频| 亚洲尤物视频在线| 丝袜美腿一区二区三区| 亚洲国产日韩av| 亚洲与欧洲av电影| 天天色图综合网| 日韩av不卡一区二区| 婷婷开心激情综合| 麻豆一区二区在线| 国产一区在线精品| 狠狠色2019综合网| 激情综合一区二区三区| 国产很黄免费观看久久| 国产大片一区二区| 99久久精品国产精品久久| 91影院在线观看| 欧美三级日韩三级国产三级| 制服丝袜成人动漫| 欧美成人激情免费网| 国产网站一区二区三区| 国产精品久久久久影院亚瑟 | 亚洲bt欧美bt精品777| 亚洲不卡在线观看| 精品在线观看视频| 国产不卡视频在线播放| 色999日韩国产欧美一区二区| 欧美日韩一二三| 日韩精品一区二区三区视频播放| 久久久国产精品午夜一区ai换脸| 国产精品丝袜一区| 亚洲精品日日夜夜| 日韩不卡免费视频| 国产福利精品一区二区| 色偷偷一区二区三区| 欧美肥胖老妇做爰| 国产无人区一区二区三区| 亚洲人成精品久久久久久| 日韩高清在线电影| 久久激情五月婷婷| 国产69精品久久久久毛片| 91在线码无精品| 69堂成人精品免费视频| 久久精品欧美日韩精品| 一区二区三区精品| 国产制服丝袜一区| 在线观看一区二区精品视频| 精品不卡在线视频| 亚洲精品国产一区二区三区四区在线 | 91丨九色丨国产丨porny| 欧美色图免费看| 久久久国产综合精品女国产盗摄| 伊人婷婷欧美激情| 国产不卡在线视频| 欧美一区欧美二区| 亚洲精品你懂的| 国产精华液一区二区三区| 欧美日韩国产一区| 亚洲国产高清不卡| 免费看日韩精品| 一本色道a无线码一区v| 久久在线观看免费| 亚洲高清在线视频| 成人深夜在线观看| 日韩免费高清电影| 亚洲电影一级黄| 成人精品视频一区二区三区 | 激情国产一区二区| 欧美手机在线视频| 亚洲欧洲日韩综合一区二区| 精品亚洲porn| 欧美日韩国产综合一区二区三区 | 精品盗摄一区二区三区| 天堂在线亚洲视频| 99精品偷自拍| 中文字幕第一区二区| 久久av资源站| 欧美日韩成人综合在线一区二区| 中文字幕免费在线观看视频一区| 麻豆国产欧美日韩综合精品二区| 欧洲视频一区二区| 日韩理论片中文av| 国产盗摄一区二区| 久久久久久影视| 麻豆成人久久精品二区三区红| 在线观看亚洲专区| 亚洲激情一二三区| 91丨九色porny丨蝌蚪| 国产精品久久久久影院老司| 国产成人aaa| 国产日本一区二区| 国产精品一品二品| 久久久综合九色合综国产精品| 青青青爽久久午夜综合久久午夜| 欧美日韩在线亚洲一区蜜芽| 亚洲自拍另类综合| 欧美在线观看视频在线| 亚洲在线一区二区三区| 欧美在线观看一区| 亚洲国产精品精华液网站| 欧洲国产伦久久久久久久| 亚洲一二三区不卡| 欧美日产国产精品| 天堂在线一区二区| 日韩一区二区免费视频| 免费人成精品欧美精品| 日韩精品一区二区三区蜜臀| 美洲天堂一区二卡三卡四卡视频| 欧美一区二区福利视频| 蜜桃精品视频在线| 精品国产髙清在线看国产毛片| 久久精品国产在热久久| 精品国产制服丝袜高跟| 国产精品一区二区91| 国产农村妇女精品| 福利一区福利二区| 亚洲三级小视频| 欧美性猛片aaaaaaa做受| 亚洲自拍偷拍综合| 日韩女优毛片在线| 国产精品亚洲综合一区在线观看| 久久久久久**毛片大全| 99精品视频一区二区三区| 一片黄亚洲嫩模| 日韩精品一区在线| 国产乱码字幕精品高清av| 国产精品萝li| 欧美日韩一区二区欧美激情| 青青草成人在线观看| 国产色婷婷亚洲99精品小说| av在线不卡电影| 亚洲国产成人va在线观看天堂| 日韩精品一区二区在线观看| 成人综合婷婷国产精品久久蜜臀 | 亚洲欧美日韩国产成人精品影院| av不卡在线播放| 一区二区三区在线观看欧美| 在线成人小视频| 国产制服丝袜一区| 亚洲少妇最新在线视频| 欧美丰满美乳xxx高潮www| 国产一区二区精品在线观看| 亚洲靠逼com| 精品国产亚洲一区二区三区在线观看| 成人久久久精品乱码一区二区三区| 亚洲综合色视频| 国产视频一区二区在线| 欧洲人成人精品| 国产激情偷乱视频一区二区三区| 一区二区在线观看视频| 久久综合狠狠综合久久激情| 色哟哟一区二区三区| 久久99深爱久久99精品| 一区二区三区久久久| 日韩手机在线导航| 99视频超级精品| 美女视频网站久久| 亚洲激情图片小说视频| 久久久久国产精品人| 欧美亚洲禁片免费| 国产成人精品免费视频网站| 日本美女一区二区三区视频| 中文字幕一区二区三区蜜月| 日韩欧美自拍偷拍| 色视频一区二区| 成熟亚洲日本毛茸茸凸凹| 精品一区二区av| 午夜久久久久久| 欧美极品另类videosde| 884aa四虎影成人精品一区|