diff src/org/eclipse/jetty/server/Request.java @ 811:1bedcd0ec275

remove more session code
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 08 Sep 2016 18:37:55 -0600
parents 09d518d313b7
children f8f7cb485c25
line wrap: on
line diff
--- a/src/org/eclipse/jetty/server/Request.java	Thu Sep 08 18:25:43 2016 -0600
+++ b/src/org/eclipse/jetty/server/Request.java	Thu Sep 08 18:37:55 2016 -0600
@@ -107,9 +107,6 @@
  * <li>The {@link Request#getContextPath()} method will return null, until the request has been passed to a {@link ContextHandler} which matches the
  * {@link Request#getPathInfo()} with a context path and calls {@link Request#setContextPath(String)} as a result.</li>
  *
- * <li>the HTTP session methods will all return null sessions until such time as a request has been passed to a
- * {@link org.eclipse.jetty.server.session.SessionHandler} which checks for session cookies and enables the ability to create new sessions.</li>
- *
  * <li>The {@link Request#getServletPath()} method will return null until the request has been passed to a <code>org.eclipse.jetty.servlet.ServletHandler</code>
  * and the pathInfo matched against the servlet URL patterns and {@link Request#setServletPath(String)} called as a result.</li>
  * </ul>
@@ -210,15 +207,11 @@
 	private String _remoteAddr;
 	private String _remoteHost;
 	private Object _requestAttributeListeners;
-	private String _requestedSessionId;
-	private boolean _requestedSessionIdFromCookie = false;
 	private String _requestURI;
-	private Map<Object, HttpSession> _savedNewSessions;
 	private String _scheme = URIUtil.HTTP;
 	private UserIdentity.Scope _scope;
 	private String _serverName;
 	private String _servletPath;
-	private HttpSession _session;
 	private long _timeStamp;
 	private long _dispatchTime;
 
@@ -1010,7 +1003,7 @@
 	 */
 	public String getRequestedSessionId()
 	{
-		return _requestedSessionId;
+		throw new UnsupportedOperationException();
 	}
 
 	/* ------------------------------------------------------------ */
@@ -1371,7 +1364,7 @@
 	 */
 	public boolean isRequestedSessionIdFromCookie()
 	{
-		return _requestedSessionId != null && _requestedSessionIdFromCookie;
+		throw new UnsupportedOperationException();
 	}
 
 	/* ------------------------------------------------------------ */
@@ -1380,7 +1373,7 @@
 	 */
 	public boolean isRequestedSessionIdFromUrl()
 	{
-		return _requestedSessionId != null && !_requestedSessionIdFromCookie;
+		throw new UnsupportedOperationException();
 	}
 
 	/* ------------------------------------------------------------ */
@@ -1389,7 +1382,7 @@
 	 */
 	public boolean isRequestedSessionIdFromURL()
 	{
-		return _requestedSessionId != null && !_requestedSessionIdFromCookie;
+		throw new UnsupportedOperationException();
 	}
 
 	/* ------------------------------------------------------------ */
@@ -1427,9 +1420,7 @@
 	/* ------------------------------------------------------------ */
 	public HttpSession recoverNewSession(Object key)
 	{
-		if (_savedNewSessions == null)
-			return null;
-		return _savedNewSessions.get(key);
+		throw new UnsupportedOperationException();
 	}
 
 	/* ------------------------------------------------------------ */
@@ -1471,9 +1462,6 @@
 		_protocol = HttpVersions.HTTP_1_1;
 		_queryEncoding = null;
 		_queryString = null;
-		_requestedSessionId = null;
-		_requestedSessionIdFromCookie = false;
-		_session = null;
 		_requestURI = null;
 		_scope = null;
 		_scheme = URIUtil.HTTP;
@@ -1487,9 +1475,6 @@
 		_paramsExtracted = false;
 		_inputState = __NONE;
 
-		if (_savedNewSessions != null)
-			_savedNewSessions.clear();
-		_savedNewSessions=null;
 		_multiPartInputStream = null;
 	}
 
@@ -1530,14 +1515,6 @@
 	}
 
 	/* ------------------------------------------------------------ */
-	public void saveNewSession(Object key, HttpSession session)
-	{
-		if (_savedNewSessions == null)
-			_savedNewSessions = new HashMap<Object, HttpSession>();
-		_savedNewSessions.put(key,session);
-	}
-
-	/* ------------------------------------------------------------ */
 	public void setAsyncSupported(boolean supported)
 	{
 		_asyncSupported = supported;
@@ -1844,26 +1821,6 @@
 
 	/* ------------------------------------------------------------ */
 	/**
-	 * @param requestedSessionId
-	 *            The requestedSessionId to set.
-	 */
-	public void setRequestedSessionId(String requestedSessionId)
-	{
-		_requestedSessionId = requestedSessionId;
-	}
-
-	/* ------------------------------------------------------------ */
-	/**
-	 * @param requestedSessionIdCookie
-	 *            The requestedSessionIdCookie to set.
-	 */
-	public void setRequestedSessionIdFromCookie(boolean requestedSessionIdCookie)
-	{
-		_requestedSessionIdFromCookie = requestedSessionIdCookie;
-	}
-
-	/* ------------------------------------------------------------ */
-	/**
 	 * @param requestURI
 	 *            The requestURI to set.
 	 */
@@ -1913,16 +1870,6 @@
 	}
 
 	/* ------------------------------------------------------------ */
-	/**
-	 * @param session
-	 *            The session to set.
-	 */
-	public void setSession(HttpSession session)
-	{
-		_session = session;
-	}
-
-	/* ------------------------------------------------------------ */
 	public void setTimeStamp(long ts)
 	{
 		_timeStamp = ts;