org.norther.tammi.spray.authenticator.chain
Class SavedRequest

java.lang.Object
  extended by javax.servlet.ServletRequestWrapper
      extended by org.norther.tammi.spray.filter.chain.ServletRequestWrapper
          extended by org.norther.tammi.spray.filter.chain.HttpServletRequestWrapper
              extended by org.norther.tammi.spray.protocol.chain.AbstractProtocolRequest
                  extended by org.norther.tammi.spray.protocol.chain.BaseProtocolRequest
                      extended by org.norther.tammi.spray.authenticator.chain.SavedRequest
All Implemented Interfaces:
Serializable, EventListener, HttpServletRequest, ServletRequest, Poolable, Recyclable, FilterChainListener

public class SavedRequest
extends BaseProtocolRequest
implements HttpServletRequest, Serializable

A saved request to be restored after authentication. It saves the request, headers and parameters and extends protocol request to return correct values after restore.

Author:
Ilkka Priha
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.norther.tammi.spray.protocol.chain.AbstractProtocolRequest
AbstractProtocolRequest.ProtocolRequestExtension
 
Field Summary
 
Fields inherited from class org.norther.tammi.spray.protocol.chain.AbstractProtocolRequest
BODY_PARSED, COOKIE_SESSION, HEADERS_PARSED, REQUEST_PARSED, URI_PARSED, URL_SESSION
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
SavedRequest()
          Constructs a new request.
 
Method Summary
 void dispose()
          Disposes the object after use.
protected  void drain()
          Drains a HTTP/1.1 request to guarantee a fresh stream for the next round.
 String getContextPath()
           
 Cookie[] getCookies()
           
protected  Map getParsedHeaderMap()
          Gets the parsed HTTP headers as a map of names and value vectors.
protected  Map getParsedParameterMap()
          Gets the parsed parameters as a map of names and value arrays.
protected  List getParsedRequestList()
          Gets the parsed request as a list of items.
protected  String getParsedRequestURI()
          Gets the parsed request URI.
 StringBuffer getRequestURL()
           
 String getServletPath()
           
 void setSavedRequest(HttpServletRequest request)
          Sets the saved.
 
Methods inherited from class org.norther.tammi.spray.protocol.chain.BaseProtocolRequest
getCharacterEncoding, getContentLength, getContentType, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getLocale, getLocales, getMethod, getProtocol, getQueryString, getRequestDispatcher, getRequestURI, getServerName, getServerPort
 
Methods inherited from class org.norther.tammi.spray.protocol.chain.AbstractProtocolRequest
addParameter, addParameter, addParameterMap, getAuthorityURL, getAuthorityURL, getAuthorityURL, getHttpFilter, getInternalCharacterEncoding, getParameter, getParameterMap, getParameterNames, getParameterValues, getPathTail, getRedirectionURL, getVersion, isAuthentication, isRedirection, isSecureSession, removeParameter, setAuthentication, setParameter, setRedirection, setRedirectionURL
 
Methods inherited from class org.norther.tammi.spray.filter.chain.HttpServletRequestWrapper
getAuthType, getPathInfo, getPathTranslated, getRemoteUser, getRequestedSessionId, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole, setRequest
 
Methods inherited from class org.norther.tammi.spray.filter.chain.ServletRequestWrapper
completed, disposed, filtered, getExtension, getFilterChain, getFilteredRequest, getFilteredResponse, isDisposed, recycle, recycle, recycled, setExtension
 
Methods inherited from class javax.servlet.ServletRequestWrapper
getAttribute, getAttributeNames, getInputStream, getLocalAddr, getLocalName, getLocalPort, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getScheme, isSecure, removeAttribute, setAttribute, setCharacterEncoding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.http.HttpServletRequest
getAuthType, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
 
Methods inherited from interface javax.servlet.ServletRequest
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding
 

Constructor Detail

SavedRequest

public SavedRequest()
Constructs a new request.

Method Detail

dispose

public void dispose()
Description copied from interface: Recyclable
Disposes the object after use. The method is called when the object is returned to its pool. The dispose method must call its super.

Specified by:
dispose in interface Recyclable
Overrides:
dispose in class BaseProtocolRequest

setSavedRequest

public void setSavedRequest(HttpServletRequest request)
Sets the saved.

Parameters:
request - the request to be saved.

getRequestURL

public StringBuffer getRequestURL()
Specified by:
getRequestURL in interface HttpServletRequest
Overrides:
getRequestURL in class BaseProtocolRequest

getContextPath

public String getContextPath()
Specified by:
getContextPath in interface HttpServletRequest
Overrides:
getContextPath in class HttpServletRequestWrapper

getServletPath

public String getServletPath()
Specified by:
getServletPath in interface HttpServletRequest
Overrides:
getServletPath in class BaseProtocolRequest

getCookies

public Cookie[] getCookies()
Specified by:
getCookies in interface HttpServletRequest
Overrides:
getCookies in class BaseProtocolRequest

drain

protected void drain()
Description copied from class: AbstractProtocolRequest
Drains a HTTP/1.1 request to guarantee a fresh stream for the next round.

Specified by:
drain in class AbstractProtocolRequest

getParsedRequestList

protected List getParsedRequestList()
Description copied from class: BaseProtocolRequest
Gets the parsed request as a list of items.

Specified by:
getParsedRequestList in class BaseProtocolRequest
Returns:
the parsed request as a list.

getParsedHeaderMap

protected Map getParsedHeaderMap()
Description copied from class: BaseProtocolRequest
Gets the parsed HTTP headers as a map of names and value vectors.

Specified by:
getParsedHeaderMap in class BaseProtocolRequest
Returns:
the parsed headers as a map.

getParsedParameterMap

protected Map getParsedParameterMap()
Description copied from class: AbstractProtocolRequest
Gets the parsed parameters as a map of names and value arrays.

Overrides:
getParsedParameterMap in class AbstractProtocolRequest
Returns:
the parsed parameters as a map.

getParsedRequestURI

protected String getParsedRequestURI()
Description copied from class: BaseProtocolRequest
Gets the parsed request URI.

Specified by:
getParsedRequestURI in class BaseProtocolRequest
Returns:
the parsed request URI.


Copyright © 2004 The Norther Organization. All rights reserved.