org.apache.jetspeed.container.invoker
Class LocalServletRequest

java.lang.Object
  extended by javax.servlet.ServletRequestWrapper
      extended by javax.servlet.http.HttpServletRequestWrapper
          extended by org.apache.jetspeed.container.invoker.LocalServletRequest
All Implemented Interfaces:
javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest

public class LocalServletRequest
extends javax.servlet.http.HttpServletRequestWrapper

Local servlet request wrapper. The purpose of this wrapper is to hold attribute information that is need for each request. In a threaded environment, each thread needs to have its own copy of this information so that there is not a timing issue with the original request object. Also, since the original request is no longer "holding" the attributes, there is no reason to remove them in the finally block. The LocalServletRequest object is automatically garbage collected at then end of this method.

Version:
$Id: $
Author:
David Sean Taylor, David Gurney

Field Summary
private  Map attributeMap
           
private  javax.servlet.http.HttpServletRequest originalRequest
           
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
LocalServletRequest(javax.servlet.http.HttpServletRequest request)
           
 
Method Summary
 Object getAttribute(String p_sKey)
           
 void removeAttribute(String key)
           
 void setAttribute(String key, Object value)
           
 
Methods inherited from class javax.servlet.http.HttpServletRequestWrapper
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
 
Methods inherited from class javax.servlet.ServletRequestWrapper
getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocale, getLocales, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, setCharacterEncoding, setRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.ServletRequest
getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocale, getLocales, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, setCharacterEncoding
 

Field Detail

attributeMap

private Map attributeMap

originalRequest

private javax.servlet.http.HttpServletRequest originalRequest
Constructor Detail

LocalServletRequest

public LocalServletRequest(javax.servlet.http.HttpServletRequest request)
Method Detail

getAttribute

public Object getAttribute(String p_sKey)
Specified by:
getAttribute in interface javax.servlet.ServletRequest
Overrides:
getAttribute in class javax.servlet.ServletRequestWrapper

removeAttribute

public void removeAttribute(String key)
Specified by:
removeAttribute in interface javax.servlet.ServletRequest
Overrides:
removeAttribute in class javax.servlet.ServletRequestWrapper

setAttribute

public void setAttribute(String key,
                         Object value)
Specified by:
setAttribute in interface javax.servlet.ServletRequest
Overrides:
setAttribute in class javax.servlet.ServletRequestWrapper


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.